From 1ffe73e1e757b3c658f24c151358bfb4163460ba Mon Sep 17 00:00:00 2001 From: John Hoford Date: Wed, 17 Apr 2013 20:40:25 -0700 Subject: fixed borders issues bug:8315216 Change-Id: I04d62984c70e7e514b8625e6a4b5ed9395137471 --- .../filtershow/filters/FiltersManager.java | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'src_pd/com') diff --git a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java index 9de9b7b91..97588db1c 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 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(); -- cgit v1.2.3