From 713cb3f8a661268d672326eccbf7189dd1f9bb1b Mon Sep 17 00:00:00 2001 From: Arka Prava Basu Date: Wed, 21 Nov 2018 15:01:18 +0530 Subject: [PATCH] Rename class names to match file names - SaturationSubfilter renamed to SaturationSubFilter to maintain camel case class name - VignetteSubfilter renamed to VignetteSubFilter for the same Signed-off-by: Arka Prava Basu --- .../zomato/photofilters/SampleFilters.java | 20 ++++++++-------- .../photofilters/imageprocessors/Filter.java | 23 ++++++++++--------- .../subfilters/BrightnessSubFilter.java | 6 ++--- .../subfilters/ColorOverlaySubFilter.java | 6 ++--- .../subfilters/ContrastSubFilter.java | 6 ++--- ...ubfilter.java => SaturationSubFilter.java} | 6 ++--- .../subfilters/ToneCurveSubFilter.java | 6 ++--- ...eSubfilter.java => VignetteSubFilter.java} | 6 ++--- 8 files changed, 40 insertions(+), 39 deletions(-) rename photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/{SaturationSubfilter.java => SaturationSubFilter.java} (83%) rename photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/{VignetteSubfilter.java => VignetteSubFilter.java} (91%) diff --git a/photofilterssdk/src/main/java/com/zomato/photofilters/SampleFilters.java b/photofilterssdk/src/main/java/com/zomato/photofilters/SampleFilters.java index bdc5a4b..6f2a663 100644 --- a/photofilterssdk/src/main/java/com/zomato/photofilters/SampleFilters.java +++ b/photofilterssdk/src/main/java/com/zomato/photofilters/SampleFilters.java @@ -2,9 +2,9 @@ import com.zomato.photofilters.geometry.Point; import com.zomato.photofilters.imageprocessors.Filter; -import com.zomato.photofilters.imageprocessors.subfilters.BrightnessSubfilter; -import com.zomato.photofilters.imageprocessors.subfilters.ContrastSubfilter; -import com.zomato.photofilters.imageprocessors.subfilters.ToneCurveSubfilter; +import com.zomato.photofilters.imageprocessors.subfilters.BrightnessSubFilter; +import com.zomato.photofilters.imageprocessors.subfilters.ContrastSubFilter; +import com.zomato.photofilters.imageprocessors.subfilters.ToneCurveSubFilter; /** * @author Varun on 01/07/15. @@ -26,7 +26,7 @@ public static Filter getStarLitFilter() { rgbKnots[6] = new Point(207, 233); rgbKnots[7] = new Point(255, 255); Filter filter = new Filter(); - filter.addSubFilter(new ToneCurveSubfilter(rgbKnots, null, null, null)); + filter.addSubFilter(new ToneCurveSubFilter(rgbKnots, null, null, null)); return filter; } @@ -42,9 +42,9 @@ public static Filter getBlueMessFilter() { redKnots[6] = new Point(225, 242); redKnots[7] = new Point(255, 255); Filter filter = new Filter(); - filter.addSubFilter(new ToneCurveSubfilter(null, redKnots, null, null)); - filter.addSubFilter(new BrightnessSubfilter(30)); - filter.addSubFilter(new ContrastSubfilter(1f)); + filter.addSubFilter(new ToneCurveSubFilter(null, redKnots, null, null)); + filter.addSubFilter(new BrightnessSubFilter(30)); + filter.addSubFilter(new ContrastSubFilter(1f)); return filter; } @@ -88,7 +88,7 @@ public static Filter getAweStruckVibeFilter() { blueKnots[6] = new Point(255, 255); Filter filter = new Filter(); - filter.addSubFilter(new ToneCurveSubfilter(rgbKnots, redKnots, greenKnots, blueKnots)); + filter.addSubFilter(new ToneCurveSubFilter(rgbKnots, redKnots, greenKnots, blueKnots)); return filter; } @@ -100,7 +100,7 @@ public static Filter getLimeStutterFilter() { blueKnots[2] = new Point(255, 255); // Check whether output is null or not. Filter filter = new Filter(); - filter.addSubFilter(new ToneCurveSubfilter(null, null, null, blueKnots)); + filter.addSubFilter(new ToneCurveSubFilter(null, null, null, blueKnots)); return filter; } @@ -132,7 +132,7 @@ public static Filter getNightWhisperFilter() { blueKnots[2] = new Point(255, 255); Filter filter = new Filter(); - filter.addSubFilter(new ToneCurveSubfilter(rgbKnots, redKnots, greenKnots, blueKnots)); + filter.addSubFilter(new ToneCurveSubFilter(rgbKnots, redKnots, greenKnots, blueKnots)); return filter; } } diff --git a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/Filter.java b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/Filter.java index a6bad7f..db6ff04 100644 --- a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/Filter.java +++ b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/Filter.java @@ -3,11 +3,12 @@ import android.graphics.Bitmap; -import com.zomato.photofilters.imageprocessors.subfilters.BrightnessSubfilter; -import com.zomato.photofilters.imageprocessors.subfilters.ColorOverlaySubfilter; -import com.zomato.photofilters.imageprocessors.subfilters.ContrastSubfilter; -import com.zomato.photofilters.imageprocessors.subfilters.ToneCurveSubfilter; -import com.zomato.photofilters.imageprocessors.subfilters.VignetteSubfilter; +import com.zomato.photofilters.imageprocessors.subfilters.BrightnessSubFilter; +import com.zomato.photofilters.imageprocessors.subfilters.ColorOverlaySubFilter; +import com.zomato.photofilters.imageprocessors.subfilters.ContrastSubFilter; +import com.zomato.photofilters.imageprocessors.subfilters.SaturationSubFilter; +import com.zomato.photofilters.imageprocessors.subfilters.ToneCurveSubFilter; +import com.zomato.photofilters.imageprocessors.subfilters.VignetteSubFilter; import java.util.ArrayList; import java.util.Iterator; @@ -31,12 +32,12 @@ public Filter() { * Adds a Subfilter to the Main Filter * * @param subFilter Subfilter like contrast, brightness, tone Curve etc. subfilter - * @see BrightnessSubfilter - * @see ColorOverlaySubfilter - * @see ContrastSubfilter - * @see ToneCurveSubfilter - * @see VignetteSubfilter - * @see com.zomato.photofilters.imageprocessors.subfilters.SaturationSubfilter + * @see BrightnessSubFilter + * @see ColorOverlaySubFilter + * @see ContrastSubFilter + * @see ToneCurveSubFilter + * @see VignetteSubFilter + * @see SaturationSubFilter */ public void addSubFilter(SubFilter subFilter) { subFilters.add(subFilter); diff --git a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/BrightnessSubFilter.java b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/BrightnessSubFilter.java index 1b07eb0..dbf9eaa 100644 --- a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/BrightnessSubFilter.java +++ b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/BrightnessSubFilter.java @@ -9,7 +9,7 @@ * @author varun * subfilter used to tweak brightness of the Bitmap */ -public class BrightnessSubfilter implements SubFilter { +public class BrightnessSubFilter implements SubFilter { private static String tag = ""; // Value is in integer private int brightness = 0; @@ -19,7 +19,7 @@ public class BrightnessSubfilter implements SubFilter { * * @param brightness Integer brightness value {value 0 has no effect} */ - public BrightnessSubfilter(int brightness) { + public BrightnessSubFilter(int brightness) { this.brightness = brightness; } @@ -35,7 +35,7 @@ public String getTag() { @Override public void setTag(Object tag) { - BrightnessSubfilter.tag = (String) tag; + BrightnessSubFilter.tag = (String) tag; } public void setBrightness(int brightness) { diff --git a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ColorOverlaySubFilter.java b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ColorOverlaySubFilter.java index 3a08ece..6e13feb 100644 --- a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ColorOverlaySubFilter.java +++ b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ColorOverlaySubFilter.java @@ -9,7 +9,7 @@ * @author varun * Subfilter used to overlay bitmap with the color defined */ -public class ColorOverlaySubfilter implements SubFilter { +public class ColorOverlaySubFilter implements SubFilter { private static String tag = ""; // the color overlay depth is between 0-255 @@ -28,7 +28,7 @@ public class ColorOverlaySubfilter implements SubFilter { * @param green Green value between 0-1 * @param blue Blue value between 0-1 */ - public ColorOverlaySubfilter(int depth, float red, float green, float blue) { + public ColorOverlaySubFilter(int depth, float red, float green, float blue) { this.colorOverlayDepth = depth; this.colorOverlayRed = red; this.colorOverlayBlue = blue; @@ -49,6 +49,6 @@ public String getTag() { @Override public void setTag(Object tag) { - ColorOverlaySubfilter.tag = (String) tag; + ColorOverlaySubFilter.tag = (String) tag; } } diff --git a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ContrastSubFilter.java b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ContrastSubFilter.java index 0e4ccd9..c3cca4a 100644 --- a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ContrastSubFilter.java +++ b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ContrastSubFilter.java @@ -9,7 +9,7 @@ * @author varun * Class to add Contrast Subfilter */ -public class ContrastSubfilter implements SubFilter { +public class ContrastSubFilter implements SubFilter { private static String tag = ""; @@ -21,7 +21,7 @@ public class ContrastSubfilter implements SubFilter { * * @param contrast The contrast value ranges in fraction, value 1 has no effect */ - public ContrastSubfilter(float contrast) { + public ContrastSubFilter(float contrast) { this.contrast = contrast; } @@ -37,7 +37,7 @@ public String getTag() { @Override public void setTag(Object tag) { - ContrastSubfilter.tag = (String) tag; + ContrastSubFilter.tag = (String) tag; } /** diff --git a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/SaturationSubfilter.java b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/SaturationSubFilter.java similarity index 83% rename from photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/SaturationSubfilter.java rename to photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/SaturationSubFilter.java index fc28bb1..0a0f2f3 100644 --- a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/SaturationSubfilter.java +++ b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/SaturationSubFilter.java @@ -8,13 +8,13 @@ /** * @author varun on 28/07/15. */ -public class SaturationSubfilter implements SubFilter { +public class SaturationSubFilter implements SubFilter { private static String tag = ""; // The Level value is float, where level = 1 has no effect on the image private float level; - public SaturationSubfilter(float level) { + public SaturationSubFilter(float level) { this.level = level; } @@ -30,7 +30,7 @@ public Object getTag() { @Override public void setTag(Object tag) { - SaturationSubfilter.tag = (String) tag; + SaturationSubFilter.tag = (String) tag; } public void setLevel(float level) { diff --git a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ToneCurveSubFilter.java b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ToneCurveSubFilter.java index cb0a696..555a066 100644 --- a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ToneCurveSubFilter.java +++ b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/ToneCurveSubFilter.java @@ -11,7 +11,7 @@ * @author varun * Subfilter to tweak rgb channels of an image */ -public class ToneCurveSubfilter implements SubFilter { +public class ToneCurveSubFilter implements SubFilter { private static String tag = ""; // These are knots which contains the plot points @@ -33,7 +33,7 @@ public class ToneCurveSubfilter implements SubFilter { * @param greenKnots Knots in green Channel * @param blueKnots Knots in Blue channel */ - public ToneCurveSubfilter(Point[] rgbKnots, Point[] redKnots, Point[] greenKnots, Point[] blueKnots) { + public ToneCurveSubFilter(Point[] rgbKnots, Point[] redKnots, Point[] greenKnots, Point[] blueKnots) { Point[] straightKnots = new Point[2]; straightKnots[0] = new Point(0, 0); straightKnots[1] = new Point(255, 255); @@ -108,6 +108,6 @@ public String getTag() { @Override public void setTag(Object tag) { - ToneCurveSubfilter.tag = (String) tag; + ToneCurveSubFilter.tag = (String) tag; } } diff --git a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/VignetteSubfilter.java b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/VignetteSubFilter.java similarity index 91% rename from photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/VignetteSubfilter.java rename to photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/VignetteSubFilter.java index 8575cd3..a11cbd5 100644 --- a/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/VignetteSubfilter.java +++ b/photofilterssdk/src/main/java/com/zomato/photofilters/imageprocessors/subfilters/VignetteSubFilter.java @@ -13,7 +13,7 @@ * @author varun * Subfilter to add Vignette effect on an image */ -public class VignetteSubfilter implements SubFilter { +public class VignetteSubFilter implements SubFilter { private static String tag = ""; private Context context; @@ -26,7 +26,7 @@ public class VignetteSubfilter implements SubFilter { * * @param alpha value of alpha ranges from 0-255 (Intensity of Vignette effect) */ - public VignetteSubfilter(Context context, int alpha) { + public VignetteSubFilter(Context context, int alpha) { this.context = context; this.alpha = alpha; } @@ -53,7 +53,7 @@ public Object getTag() { @Override public void setTag(Object tag) { - VignetteSubfilter.tag = (String) tag; + VignetteSubFilter.tag = (String) tag; } /**