]> Shamusworld >> Repos - architektonas/blobdiff - src/circle.cpp
Trim tool now works for Lines, but inaccurate.
[architektonas] / src / circle.cpp
index b722f4d390a3c290ec6a68338b6591ebc061497a..94a9ec8f807b47b5e867bb3e5fab79b951c46c3a 100644 (file)
@@ -118,7 +118,7 @@ Circle::~Circle()
 }
 
 
-/*virtual*/ void Circle::PointerMoved(Vector point)
+/*virtual*/ bool Circle::PointerMoved(Vector point)
 {
        if (selectionInProgress)
        {
@@ -129,13 +129,13 @@ Circle::~Circle()
                else
                        state = OSInactive;
 
-               return;
+               return false;
        }
 
        // Hit test tells us what we hit (if anything) through boolean variables. It
        // also tells us whether or not the state changed.
        SaveHitState();
-       HitTest(point);
+       bool hovered = HitTest(point);
        needUpdate = HitStateChanged();
        objectWasDragged = (draggingEdge | draggingCenter);
 
@@ -149,6 +149,7 @@ Circle::~Circle()
 
        // Save this point so the rendering code knows where to draw the handle...
        dragPoint = point;
+       return hovered;
 }
 
 
@@ -243,10 +244,16 @@ same reference number.
 }
 
 
+/*virtual*/ void Circle::Rotate(Point point, double angle)
+{
+       Point c1 = Geometry::RotatePointAroundPoint(position, point, angle);
+       position = c1;
+}
+
+
 /*virtual*/ void Circle::Mirror(Point p1, Point p2)
 {
        Point c1 = Geometry::MirrorPointAroundLine(position, p1, p2);
-//     return new Circle(c1, radius);
        position = c1;
 }