]> Shamusworld >> Repos - architektonas/blobdiff - src/arc.cpp
Trim tool now works for Lines, but inaccurate.
[architektonas] / src / arc.cpp
index e4a6b6f4788de7b89f1196fa75a8018217fad421..6aefc1c52bc663d1070e8b8e252f175962266737 100644 (file)
@@ -216,7 +216,7 @@ so let's do like this:
 }
 
 
-/*virtual*/ void Arc::PointerMoved(Vector point)
+/*virtual*/ bool Arc::PointerMoved(Vector point)
 {
 // one other thing to check here for is if a modifier key is being held as well,
 // to allow for multi-selection
@@ -229,7 +229,7 @@ so let's do like this:
                else
                        state = OSInactive;
 
-               return;
+               return false;
        }
 
        // The TLC will send these messages if the object is selected but not clicked on.
@@ -239,7 +239,7 @@ so let's do like this:
 //     objectWasDragged = true;
 //     needUpdate = false;
        SaveHitState();
-       HitTest(point);
+       bool hovered = HitTest(point);
        needUpdate = HitStateChanged();
        objectWasDragged = (draggingCenter | draggingEdge | draggingRotate | draggingSpan);
 
@@ -271,6 +271,7 @@ so let's do like this:
        // Why save this? For rendering code?
        oldPoint = point;
 //     needUpdate = true;
+       return hovered;
 }
 
 
@@ -302,7 +303,8 @@ This vector is already unitized, so all we need to do to get our point is to
 multiply it by radius (to get the length correct) and add it to the center
 point (to get the correct position).
 */
-       Vector v1(point, position);     // Head minus tail (vector points at "point")
+//     Vector v1(point, position);     // Head minus tail (vector points at "point")
+       Vector v1(position, point);     // Head minus tail (vector points at "point")
        Point p1(cos(startAngle), sin(startAngle));
        Point p2(cos(startAngle + angleSpan), sin(startAngle + angleSpan));
        Vector handle2 = (p1 * radius) + position;