diff options
author | nicolasroard <nicolasroard@google.com> | 2012-09-29 00:17:09 -0700 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2012-09-29 16:58:46 -0700 |
commit | 0e0d71794f9765cd4234386789c882dacbb4e318 (patch) | |
tree | c04a942624a9214c2bfd18d2ecaddfdc2aa45140 /src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java | |
parent | dacc688e9237890bd1698ccfa1e6402dc9f24f15 (diff) | |
download | android_packages_apps_Snap-0e0d71794f9765cd4234386789c882dacbb4e318.tar.gz android_packages_apps_Snap-0e0d71794f9765cd4234386789c882dacbb4e318.tar.bz2 android_packages_apps_Snap-0e0d71794f9765cd4234386789c882dacbb4e318.zip |
Fix border bug and filter application
- fix layout (use framelayout)
- fix copy imagepreset
- added a current image state panel
- remove title for border images for now
bug:7256090
bug:7249672
bug:7234317
bug:7225150
Change-Id: I958628a1604c7e436e5d121556c8744f5748b1ec
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java index baa85e13f..4e46943fc 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java @@ -10,22 +10,25 @@ import android.graphics.Paint; import android.graphics.Paint.Style; import android.graphics.Shader.TileMode; +import com.android.gallery3d.filtershow.ui.Spline; + public class ImageFilterGradient extends ImageFilter { private Bitmap mGradientBitmap = null; private int[] mColors = null; private float[] mPositions = null; - public String name() { - return "Gradient"; + public ImageFilterGradient() { + mName = "Gradient"; } - public ImageFilter copy() { - ImageFilterGradient gradient = new ImageFilterGradient(); + @Override + public ImageFilter clone() throws CloneNotSupportedException { + ImageFilterGradient filter = (ImageFilterGradient) super.clone(); for (int i = 0; i < mColors.length; i++) { - gradient.addColor(mColors[i], mPositions[i]); + filter.addColor(mColors[i], mPositions[i]); } - return gradient; + return filter; } public void addColor(int color, float position) { |