summaryrefslogtreecommitdiffstats
path: root/src_pd
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-04-18 03:40:25 (GMT)
committerJohn Hoford <hoford@google.com>2013-04-18 20:50:57 (GMT)
commit1ffe73e1e757b3c658f24c151358bfb4163460ba (patch)
tree46c78eefb1f892860e778f333226ba1b41c66310 /src_pd
parentb0e82433a948ab7625d5c0343a4207ea9a45bbf7 (diff)
downloadandroid_packages_apps_Snap-1ffe73e1e757b3c658f24c151358bfb4163460ba.zip
android_packages_apps_Snap-1ffe73e1e757b3c658f24c151358bfb4163460ba.tar.gz
android_packages_apps_Snap-1ffe73e1e757b3c658f24c151358bfb4163460ba.tar.bz2
fixed borders issues
bug:8315216 Change-Id: I04d62984c70e7e514b8625e6a4b5ed9395137471
Diffstat (limited to 'src_pd')
-rw-r--r--src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java29
1 files changed, 28 insertions, 1 deletions
diff --git a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
index 9de9b7b..97588db 100644
--- a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
+++ b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
@@ -16,7 +16,11 @@
package com.android.gallery3d.filtershow.filters;
+import android.content.Context;
import android.content.res.Resources;
+import android.graphics.Color;
+
+import com.android.gallery3d.R;
import java.util.HashMap;
import java.util.Vector;
@@ -25,7 +29,7 @@ public class FiltersManager extends BaseFiltersManager {
private static FiltersManager sInstance = null;
private static FiltersManager sPreviewInstance = null;
private static FiltersManager sHighresInstance = null;
-
+ private static int mImageBorderSize = 4; // in percent
public FiltersManager() {
init();
}
@@ -44,6 +48,29 @@ public class FiltersManager extends BaseFiltersManager {
return sInstance;
}
+ @Override
+ public void addBorders(Context context, Vector<FilterRepresentation> representations) {
+ // Regular borders
+ representations.add(new FilterImageBorderRepresentation(R.drawable.filtershow_border_4x5));
+ representations.add(
+ new FilterImageBorderRepresentation(R.drawable.filtershow_border_brush));
+ representations.add(
+ new FilterImageBorderRepresentation(R.drawable.filtershow_border_grunge));
+ representations.add(
+ new FilterImageBorderRepresentation(R.drawable.filtershow_border_sumi_e));
+ representations.add(new FilterImageBorderRepresentation(R.drawable.filtershow_border_tape));
+ representations.add(new FilterColorBorderRepresentation(Color.BLACK, mImageBorderSize, 0));
+ representations.add(new FilterColorBorderRepresentation(Color.BLACK, mImageBorderSize,
+ mImageBorderSize));
+ representations.add(new FilterColorBorderRepresentation(Color.WHITE, mImageBorderSize, 0));
+ representations.add(new FilterColorBorderRepresentation(Color.WHITE, mImageBorderSize,
+ mImageBorderSize));
+ int creamColor = Color.argb(255, 237, 237, 227);
+ representations.add(new FilterColorBorderRepresentation(creamColor, mImageBorderSize, 0));
+ representations.add(new FilterColorBorderRepresentation(creamColor, mImageBorderSize,
+ mImageBorderSize));
+ }
+
public static FiltersManager getHighresManager() {
if (sHighresInstance == null) {
sHighresInstance = new FiltersManager();