summaryrefslogtreecommitdiffstats
path: root/src_pd/com/android/gallery3d/filtershow
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-02-11 09:55:33 -0800
committernicolasroard <nicolasroard@google.com>2013-02-11 13:49:11 -0800
commit9c37635183f7908746982a191005d53f8efb71d6 (patch)
treee6ac821b75444915c60f3ece6fd4068fc26f26bb /src_pd/com/android/gallery3d/filtershow
parent2b74cb3e2fbdde0a818eca06645b4a55553e371e (diff)
downloadandroid_packages_apps_Snap-9c37635183f7908746982a191005d53f8efb71d6.zip
android_packages_apps_Snap-9c37635183f7908746982a191005d53f8efb71d6.tar.gz
android_packages_apps_Snap-9c37635183f7908746982a191005d53f8efb71d6.tar.bz2
Cleaning filters
Change-Id: I413b935f90cebdab37d3db73d7fcb0fe77a64579
Diffstat (limited to 'src_pd/com/android/gallery3d/filtershow')
-rw-r--r--src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
index 3a259e9..5ddabe2 100644
--- a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
+++ b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
@@ -57,6 +57,33 @@ public class FiltersManager {
return gInstance;
}
+ public static FilterRepresentation getRepresentation(Class c) {
+ ImageFilter filter = mFilters.get(c);
+ if (filter != null) {
+ return filter.getDefaultRepresentation();
+ }
+ return null;
+ }
+
+ public static void addFilterRepresentations(Vector<FilterRepresentation> representations) {
+ representations.add(getRepresentation(ImageFilterTinyPlanet.class));
+ representations.add(getRepresentation(ImageFilterWBalance.class));
+ representations.add(getRepresentation(ImageFilterExposure.class));
+ representations.add(getRepresentation(ImageFilterVignette.class));
+ representations.add(getRepresentation(ImageFilterContrast.class));
+ representations.add(getRepresentation(ImageFilterShadows.class));
+ representations.add(getRepresentation(ImageFilterVibrance.class));
+ representations.add(getRepresentation(ImageFilterSharpen.class));
+ representations.add(getRepresentation(ImageFilterCurves.class));
+ representations.add(getRepresentation(ImageFilterDraw.class));
+ representations.add(getRepresentation(ImageFilterHue.class));
+ representations.add(getRepresentation(ImageFilterSaturated.class));
+ representations.add(getRepresentation(ImageFilterBwFilter.class));
+ representations.add(getRepresentation(ImageFilterNegative.class));
+ representations.add(getRepresentation(ImageFilterEdge.class));
+ representations.add(getRepresentation(ImageFilterKMeans.class));
+ }
+
public static void addFilters(Vector<ImageFilter> filters) {
filters.add(new ImageFilterTinyPlanet());
filters.add(new ImageFilterWBalance());