diff options
Diffstat (limited to 'src/com/android/gallery3d/filtershow/ui/Spline.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/ui/Spline.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/ui/Spline.java b/src/com/android/gallery3d/filtershow/ui/Spline.java index cadf2fd9c..5b931a98c 100644 --- a/src/com/android/gallery3d/filtershow/ui/Spline.java +++ b/src/com/android/gallery3d/filtershow/ui/Spline.java @@ -83,6 +83,28 @@ public class Spline { return Color.WHITE; } + public boolean sameValues(Spline other) { + if (this == other) { + return true; + } + if (other == null) { + return false; + } + + if (getNbPoints() != other.getNbPoints()) { + return false; + } + + for (int i = 0; i < getNbPoints(); i++) { + ControlPoint p = mPoints.elementAt(i); + ControlPoint otherPoint = other.mPoints.elementAt(i); + if (!p.sameValues(otherPoint)) { + return false; + } + } + return true; + } + private void didMovePoint(ControlPoint point) { mCurrentControlPoint = point; } |