Fix curves tool
bug:7344301
bug:7328680
bug:7289525
bug:7234239
Change-Id: I78d09dc2b38b11ccb2aac38ceef3acd8041f245e
diff --git a/src/com/android/gallery3d/filtershow/ui/ControlPoint.java b/src/com/android/gallery3d/filtershow/ui/ControlPoint.java
index 68b799a..0c08e76 100644
--- a/src/com/android/gallery3d/filtershow/ui/ControlPoint.java
+++ b/src/com/android/gallery3d/filtershow/ui/ControlPoint.java
@@ -2,26 +2,19 @@
package com.android.gallery3d.filtershow.ui;
public class ControlPoint implements Comparable {
+ public float x;
+ public float y;
+
public ControlPoint(float px, float py) {
x = px;
y = py;
}
- public ControlPoint multiply(float m) {
- return new ControlPoint(x * m, y * m);
+ public ControlPoint(ControlPoint point) {
+ x = point.x;
+ y = point.y;
}
- public ControlPoint add(ControlPoint v) {
- return new ControlPoint(x + v.x, y + v.y);
- }
-
- public ControlPoint sub(ControlPoint v) {
- return new ControlPoint(x - v.x, y - v.y);
- }
-
- public float x;
- public float y;
-
public ControlPoint copy() {
return new ControlPoint(x, y);
}