summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-08-12 17:25:02 -0700
committerJohn Hoford <hoford@google.com>2013-08-12 18:04:46 -0700
commita7836003e689af28725930ba6a2c191275876577 (patch)
treeae7e745058b96a1b94176b86cc9ca7982944025a /src/com/android/gallery3d
parentc31d762d7630f2e5edd451ce5ddb200cf5743ee4 (diff)
downloadandroid_packages_apps_Gallery2-a7836003e689af28725930ba6a2c191275876577.tar.gz
android_packages_apps_Gallery2-a7836003e689af28725930ba6a2c191275876577.tar.bz2
android_packages_apps_Gallery2-a7836003e689af28725930ba6a2c191275876577.zip
add circle brush
Change-Id: Iee5bc138599853b9c5343ae2e6f02b22ea4abe2d
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorDraw.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java18
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java1
3 files changed, 12 insertions, 8 deletions
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)
};