summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-02-12 16:59:13 -0800
committerJohn Hoford <hoford@google.com>2013-02-12 17:01:49 -0800
commit1335f1395bdc518cbb6dd13f2faabdd4631a0253 (patch)
treede6ce03edea22069aa0aa660c3b1e55129a2d83f /src
parentec0610102caf5353c07c8b271763d2509db474ee (diff)
downloadandroid_packages_apps_Snap-1335f1395bdc518cbb6dd13f2faabdd4631a0253.tar.gz
android_packages_apps_Snap-1335f1395bdc518cbb6dd13f2faabdd4631a0253.tar.bz2
android_packages_apps_Snap-1335f1395bdc518cbb6dd13f2faabdd4631a0253.zip
fix ranges for various filters
Change-Id: I6790b06c5c4094c442ce19cb2ed7ddb6a4152f3a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/editors/BasicEditor.java2
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java7
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java6
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java3
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java2
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterRedEye.java2
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java7
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java6
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java6
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java8
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java3
11 files changed, 44 insertions, 8 deletions
diff --git a/src/com/android/gallery3d/filtershow/editors/BasicEditor.java b/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
index b7f5d7d26..48aa5925a 100644
--- a/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
+++ b/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
@@ -65,7 +65,7 @@ public class BasicEditor extends Editor implements OnSeekBarChangeListener {
if (getLocalRepresentation() != null && getLocalRepresentation() instanceof FilterBasicRepresentation) {
FilterBasicRepresentation interval = (FilterBasicRepresentation) getLocalRepresentation();
boolean f = interval.showParameterValue();
- mSeekBar.setVisibility((f) ? View.VISIBLE : View.INVISIBLE);
+ mSeekBar.setVisibility((f) ? View.VISIBLE : View.GONE);
int value = interval.getValue();
int min = interval.getMinimum();
int max = interval.getMaximum();
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java
index 36da68b7b..2f94e3d17 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java
@@ -27,11 +27,16 @@ public class ImageFilterContrast extends SimpleImageFilter {
}
public FilterRepresentation getDefaultRepresentation() {
- FilterRepresentation representation = super.getDefaultRepresentation();
+ FilterBasicRepresentation representation =
+ (FilterBasicRepresentation) super.getDefaultRepresentation();
representation.setName("Contrast");
representation.setFilterClass(ImageFilterContrast.class);
representation.setTextId(R.string.contrast);
representation.setButtonId(R.id.contrastButton);
+
+ representation.setMinimum(-100);
+ representation.setMaximum(100);
+ representation.setDefaultValue(0);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java
index 8bb35f853..7a8df71af 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java
@@ -27,11 +27,15 @@ public class ImageFilterExposure extends SimpleImageFilter {
}
public FilterRepresentation getDefaultRepresentation() {
- FilterRepresentation representation = super.getDefaultRepresentation();
+ FilterBasicRepresentation representation =
+ (FilterBasicRepresentation) super.getDefaultRepresentation();
representation.setName("Exposure");
representation.setFilterClass(ImageFilterExposure.class);
representation.setTextId(R.string.exposure);
representation.setButtonId(R.id.exposureButton);
+ representation.setMinimum(-100);
+ representation.setMaximum(100);
+ representation.setDefaultValue(0);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java
index 54bd068fc..8c484c72e 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java
@@ -30,7 +30,8 @@ public class ImageFilterHue extends SimpleImageFilter {
}
public FilterRepresentation getDefaultRepresentation() {
- FilterBasicRepresentation representation = (FilterBasicRepresentation) super.getDefaultRepresentation();
+ FilterBasicRepresentation representation =
+ (FilterBasicRepresentation) super.getDefaultRepresentation();
representation.setName("Hue");
representation.setFilterClass(ImageFilterHue.class);
representation.setMinimum(-180);
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
index c0208765b..34cd052eb 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
@@ -3,6 +3,7 @@ package com.android.gallery3d.filtershow.filters;
import android.graphics.Bitmap;
import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
public class ImageFilterNegative extends ImageFilter {
@@ -17,6 +18,7 @@ public class ImageFilterNegative extends ImageFilter {
representation.setButtonId(R.id.negativeButton);
representation.setShowEditingControls(false);
representation.setShowParameterValue(false);
+ representation.setEditorId(ImageOnlyEditor.ID);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterRedEye.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterRedEye.java
index a65a9631b..17e1427a6 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterRedEye.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterRedEye.java
@@ -20,6 +20,7 @@ import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.graphics.RectF;
+import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.imageshow.GeometryMetadata;
import java.util.Vector;
@@ -35,6 +36,7 @@ public class ImageFilterRedEye extends ImageFilter {
@Override
public FilterRepresentation getDefaultRepresentation() {
FilterRedEyeRepresentation representation = new FilterRedEyeRepresentation();
+ representation.setOverlayId(R.drawable.photoeditor_effect_redeye);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java
index f6ef78138..6cd833206 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java
@@ -26,12 +26,17 @@ public class ImageFilterSaturated extends SimpleImageFilter {
mName = "Saturated";
}
+ @Override
public FilterRepresentation getDefaultRepresentation() {
- FilterRepresentation representation = super.getDefaultRepresentation();
+ FilterBasicRepresentation representation =
+ (FilterBasicRepresentation) super.getDefaultRepresentation();
representation.setName("Saturated");
representation.setFilterClass(ImageFilterSaturated.class);
representation.setTextId(R.string.saturation);
representation.setButtonId(R.id.saturationButton);
+ representation.setMinimum(-100);
+ representation.setMaximum(100);
+ representation.setDefaultValue(0);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java
index b50b28e52..e17823955 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java
@@ -28,11 +28,15 @@ public class ImageFilterShadows extends SimpleImageFilter {
}
public FilterRepresentation getDefaultRepresentation() {
- FilterRepresentation representation = super.getDefaultRepresentation();
+ FilterBasicRepresentation representation =
+ (FilterBasicRepresentation) super.getDefaultRepresentation();
representation.setName("Shadows");
representation.setFilterClass(ImageFilterShadows.class);
representation.setTextId(R.string.shadow_recovery);
representation.setButtonId(R.id.shadowRecoveryButton);
+ representation.setMinimum(-100);
+ representation.setMaximum(100);
+ representation.setDefaultValue(0);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java
index ac20205f0..a57af71df 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java
@@ -27,11 +27,15 @@ public class ImageFilterVibrance extends SimpleImageFilter {
}
public FilterRepresentation getDefaultRepresentation() {
- FilterRepresentation representation = super.getDefaultRepresentation();
+ FilterBasicRepresentation representation =
+ (FilterBasicRepresentation) super.getDefaultRepresentation();
representation.setName("Vibrance");
representation.setFilterClass(ImageFilterVibrance.class);
representation.setTextId(R.string.vibrance);
representation.setButtonId(R.id.vibranceButton);
+ representation.setMinimum(-100);
+ representation.setMaximum(100);
+ representation.setDefaultValue(0);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
index ac0fdee13..465d90bfd 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
@@ -30,12 +30,18 @@ public class ImageFilterVignette extends SimpleImageFilter {
}
public FilterRepresentation getDefaultRepresentation() {
- FilterBasicRepresentation representation = (FilterBasicRepresentation) super.getDefaultRepresentation();
+ FilterBasicRepresentation representation =
+ (FilterBasicRepresentation) super.getDefaultRepresentation();
representation.setName("Vignette");
representation.setFilterClass(ImageFilterVignette.class);
representation.setPriority(FilterRepresentation.TYPE_VIGNETTE);
representation.setTextId(R.string.vignette);
representation.setButtonId(R.id.vignetteButton);
+
+ representation.setMinimum(-100);
+ representation.setMaximum(100);
+ representation.setDefaultValue(0);
+
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java
index 8b6dd5426..7f21fea30 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java
@@ -17,6 +17,7 @@
package com.android.gallery3d.filtershow.filters;
import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
import android.graphics.Bitmap;
@@ -34,6 +35,8 @@ public class ImageFilterWBalance extends ImageFilter {
representation.setTextId(R.string.wbalance);
representation.setButtonId(R.id.wbalanceButton);
representation.setShowEditingControls(false);
+ representation.setShowParameterValue(false);
+ representation.setEditorId(ImageOnlyEditor.ID);
return representation;
}