diff options
| -rw-r--r-- | res/drawable-nodpi/brush_gauss.png | bin | 0 -> 15867 bytes | |||
| -rw-r--r-- | src/com/android/gallery3d/filtershow/editors/EditorDraw.java | 1 | ||||
| -rw-r--r-- | src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java | 18 | ||||
| -rw-r--r-- | src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java | 1 |
4 files changed, 12 insertions, 8 deletions
diff --git a/res/drawable-nodpi/brush_gauss.png b/res/drawable-nodpi/brush_gauss.png Binary files differnew file mode 100644 index 000000000..6ccb53b76 --- /dev/null +++ b/res/drawable-nodpi/brush_gauss.png diff --git a/src/com/android/gallery3d/filtershow/editors/EditorDraw.java b/src/com/android/gallery3d/filtershow/editors/EditorDraw.java index c97365120..b05eb5cb7 100644 --- a/src/com/android/gallery3d/filtershow/editors/EditorDraw.java +++ b/src/com/android/gallery3d/filtershow/editors/EditorDraw.java @@ -54,6 +54,7 @@ public class EditorDraw extends ParametricEditor implements FilterView { private static final int MODE_STYLE = FilterDrawRepresentation.PARAM_STYLE; int[] brushIcons = { R.drawable.brush_flat, + R.drawable.brush_gauss, R.drawable.brush_marker, R.drawable.brush_spatter }; diff --git a/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java index 8a4799c1c..05a8b11bf 100644 --- a/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java +++ b/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java @@ -51,9 +51,16 @@ public class FilterDrawRepresentation extends FilterRepresentation { private BasicParameterInt mParamBrightness = new ParameterBrightness(PARAM_BRIGHTNESS, 220); private BasicParameterInt mParamSaturation = new ParameterSaturation(PARAM_SATURATION, 200); private ParameterOpacity mParamOpacity = new ParameterOpacity(PARAM_OPACITY, 200); - private BasicParameterStyle mParamStyle = new BasicParameterStyle(PARAM_STYLE, 3); + private BasicParameterStyle mParamStyle = new BasicParameterStyle(PARAM_STYLE, 4); int mParamMode; Parameter mCurrentParam = mParamSize; + private static final String SERIAL_COLOR = "color"; + private static final String SERIAL_RADIUS = "radius"; + private static final String SERIAL_TYPE = "type"; + private static final String SERIAL_POINTS_COUNT = "point_count"; + private static final String SERIAL_POINTS = "points"; + private static final String SERIAL_PATH = "path"; + private Parameter[] mAllParam = { mParamSize, @@ -83,7 +90,7 @@ public class FilterDrawRepresentation extends FilterRepresentation { public float mRadius; public int mColor; public int noPoints = 0; - public float []mPoints = new float [20]; + public float[] mPoints = new float[20]; @Override public String toString() { @@ -256,11 +263,6 @@ public class FilterDrawRepresentation extends FilterRepresentation { mCurrent = null; mDrawing.clear(); } - private static final String SERIAL_COLOR = "color"; - private static final String SERIAL_RADIUS = "radius"; - private static final String SERIAL_TYPE = "type"; - private static final String SERIAL_POINTS_COUNT = "point_count"; - private static final String SERIAL_POINTS = "points"; @Override public void serializeRepresentation(JsonWriter writer) throws IOException { @@ -272,7 +274,7 @@ public class FilterDrawRepresentation extends FilterRepresentation { PathMeasure mPathMeasure = new PathMeasure(); for (int i = 0; i < len; i++) { - writer.name("path" + i); + writer.name(SERIAL_PATH + i); writer.beginObject(); StrokeData mark = mDrawing.get(i); writer.name(SERIAL_COLOR).value(mark.mColor); diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java index 7df5ffb64..310808c21 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java @@ -54,6 +54,7 @@ public class ImageFilterDraw extends ImageFilter { DrawStyle[] mDrawingsTypes = new DrawStyle[] { new SimpleDraw(), + new Brush(R.drawable.brush_gauss), new Brush(R.drawable.brush_marker), new Brush(R.drawable.brush_spatter) }; |
