]> Shamusworld >> Repos - architektonas/blobdiff - src/line.cpp
Added rotation tool.
[architektonas] / src / line.cpp
index b7abc9ad6bb62939cb9ddd5102a65d25d7bcadf3..90b5dc21e96485391fcaad161d1147d54c98912c 100644 (file)
@@ -123,6 +123,11 @@ Line::~Line()
 
 /*virtual*/ bool Line::Collided(Vector point)
 {
+/*
+what we can do here is set ignoreClicks to true to keep other objects that are
+selected from deselecting themselves. Will that fuck up something else? Not sure
+yet... :-/
+*/
        // Someone told us to fuck off, so we'll fuck off. :-)
        if (ignoreClicks)
                return false;
@@ -571,12 +576,16 @@ same reference number.
 }
 
 
-/*virtual*/ void Line::Rotate(Vector point, double angle)
+/*virtual*/ void Line::Rotate(Point point, double angle)
 {
+       Point l1 = Geometry::RotatePointAroundPoint(position, point, angle);
+       Point l2 = Geometry::RotatePointAroundPoint(endpoint, point, angle);
+       position = l1;
+       endpoint = l2;
 }
 
 
-/*virtual*/ void Line::Scale(Vector point, double amount)
+/*virtual*/ void Line::Scale(Point point, double amount)
 {
 }