summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/PanelController.java
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2012-10-23 15:17:12 -0700
committerJohn Hoford <hoford@google.com>2012-10-23 15:55:48 -0700
commit70d8bce63b966a00447f8dbd1736fe26a62b07ac (patch)
treec409507c611a55158b9d4e6fad0c91f8aad619c5 /src/com/android/gallery3d/filtershow/PanelController.java
parent1e09027a2cc43960eca65404381d791e2d243cab (diff)
downloadandroid_packages_apps_Snap-70d8bce63b966a00447f8dbd1736fe26a62b07ac.tar.gz
android_packages_apps_Snap-70d8bce63b966a00447f8dbd1736fe26a62b07ac.tar.bz2
android_packages_apps_Snap-70d8bce63b966a00447f8dbd1736fe26a62b07ac.zip
add support for black and white filters, add rotation API to tiny planet
bug:7386370 bug:7389189 Change-Id: I1720893000c39edf28a356fb7b56634f004ef120
Diffstat (limited to 'src/com/android/gallery3d/filtershow/PanelController.java')
-rw-r--r--src/com/android/gallery3d/filtershow/PanelController.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/PanelController.java b/src/com/android/gallery3d/filtershow/PanelController.java
index 9fc1109cb..2bf95e759 100644
--- a/src/com/android/gallery3d/filtershow/PanelController.java
+++ b/src/com/android/gallery3d/filtershow/PanelController.java
@@ -27,6 +27,7 @@ import android.widget.TextView;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.filters.ImageFilter;
+import com.android.gallery3d.filtershow.filters.ImageFilterBwFilter;
import com.android.gallery3d.filtershow.filters.ImageFilterContrast;
import com.android.gallery3d.filtershow.filters.ImageFilterCurves;
import com.android.gallery3d.filtershow.filters.ImageFilterExposure;
@@ -548,6 +549,10 @@ public class PanelController implements OnClickListener {
filter = setImagePreset(new ImageFilterSaturated(), name);
}
if (filter == null
+ && name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.bwfilter))) {
+ filter = setImagePreset(new ImageFilterBwFilter(), name);
+ }
+ if (filter == null
&& name.equalsIgnoreCase(mCurrentImage.getContext().getString(R.string.hue))) {
filter = setImagePreset(new ImageFilterHue(), name);
}
@@ -704,6 +709,13 @@ public class PanelController implements OnClickListener {
ensureFilter(ename);
break;
}
+ case R.id.bwfilterButton: {
+ mCurrentImage = showImageView(R.id.imageShow).setShowControls(true);
+ String ename = mCurrentImage.getContext().getString(R.string.bwfilter);
+ mUtilityPanel.setEffectName(ename);
+ ensureFilter(ename);
+ break;
+ }
case R.id.wbalanceButton: {
mCurrentImage = showImageView(R.id.imageShow).setShowControls(false);
String ename = mCurrentImage.getContext().getString(R.string.wbalance);