diff options
| author | huiyan <huiyan@codeaurora.org> | 2016-05-25 17:20:02 +0800 |
|---|---|---|
| committer | Steve Kondik <steve@cyngn.com> | 2016-09-26 04:54:49 -0700 |
| commit | fbc9d0928516bff8dd55cccdfff585807e84d4b8 (patch) | |
| tree | 74fe351be69458a2e2896297a2d5afc1b702d469 | |
| parent | c9611fe10848db873d3e54f7e33cff3a985f78ec (diff) | |
| download | android_packages_apps_Gallery2-fbc9d0928516bff8dd55cccdfff585807e84d4b8.tar.gz android_packages_apps_Gallery2-fbc9d0928516bff8dd55cccdfff585807e84d4b8.tar.bz2 android_packages_apps_Gallery2-fbc9d0928516bff8dd55cccdfff585807e84d4b8.zip | |
Gallery2: Fix the picture display error after doing rotate operation.
After rotating the image, use previous canvas to draw the new content,
but the canvas is not erased the previous content before using to draw.
So if the format of the image is png which alpha is set,
the previous content can be seen by the transparent part.
Before drawing the new content, the canvas erase the previous content to
make the canvas clean.
Change-Id: I9f5c3196eed28470673d90d02ce9fdc3fca62727
CRs-Fixed: 996568
| -rw-r--r-- | src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java b/src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java index 614b6485d..60948272e 100644 --- a/src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java +++ b/src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java @@ -18,6 +18,7 @@ package com.android.gallery3d.filtershow.imageshow; import android.graphics.Bitmap; import android.graphics.Canvas; +import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Rect; @@ -319,6 +320,7 @@ public final class GeometryMathUtils { BitmapCache bitmapCache = MasterImage.getImage().getBitmapCache(); Bitmap temp = bitmapCache.getBitmap(frame.width(), frame.height(), BitmapCache.UTIL_GEOMETRY); + temp.eraseColor(Color.TRANSPARENT); Canvas canvas = new Canvas(temp); Paint paint = new Paint(); paint.setAntiAlias(true); |
