summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-03-04 18:33:55 -0800
committerJohn Hoford <hoford@google.com>2013-03-04 18:33:55 -0800
commitfc7d46515db7a3a50f7416c2462030609391cf95 (patch)
treeaebaca52a6de2530fc246d452427c744601bb629
parent5300e0c54110d67f85fdb2ee9c90be58f50ca4ac (diff)
downloadandroid_packages_apps_Gallery2-fc7d46515db7a3a50f7416c2462030609391cf95.tar.gz
android_packages_apps_Gallery2-fc7d46515db7a3a50f7416c2462030609391cf95.tar.bz2
android_packages_apps_Gallery2-fc7d46515db7a3a50f7416c2462030609391cf95.zip
fixed vignetnette refresh during pan/zoom
Change-Id: I6bcc13cdd5232a15f199d8f64258c450f045c1cf
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageVignette.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageVignette.java b/src/com/android/gallery3d/filtershow/imageshow/ImageVignette.java
index f43ea6cad..c55e5ae42 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageVignette.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageVignette.java
@@ -150,6 +150,16 @@ public class ImageVignette extends ImageShow {
if (mVignetteRep == null) {
return;
}
+ Matrix toImg = getScreenToImageMatrix(false);
+ Matrix toScr = new Matrix();
+ toImg.invert(toScr);
+ float[] c = new float[] {
+ mVignetteRep.getCenterX(), mVignetteRep.getCenterY() };
+ toScr.mapPoints(c);
+ mElipse.setCenter(c[0], c[1]);
+ mElipse.setRadius(toScr.mapRadius(mVignetteRep.getRadiusX()),
+ toScr.mapRadius(mVignetteRep.getRadiusY()));
+
mElipse.draw(canvas);
}