Beispiel #1
0
 @Override
 public Handle moveHandle(HandleGesture gesture) {
     Handle[] hs = getHandleArray(gesture);
     Handle ret = null;
     if (!hs[0].equals(p0)) {
         p0 = hs[0].getLocation();
         ret = hs[0];
     }
     if (!hs[1].equals(p1)) {
         p1 = hs[1].getLocation();
         ret = hs[1];
     }
     if (!hs[2].equals(p2)) {
         p2 = hs[2].getLocation();
         ret = hs[2];
     }
     bounds = CurveUtil.getBounds(toArray(p0), toArray(p1), toArray(p2));
     return ret;
 }
Beispiel #2
0
 public Curve(Location end0, Location end1, Location ctrl) {
     this.p0 = end0;
     this.p1 = ctrl;
     this.p2 = end1;
     bounds = CurveUtil.getBounds(toArray(p0), toArray(p1), toArray(p2));
 }