]> Shamusworld >> Repos - architektonas/blobdiff - src/mirroraction.cpp
Beginning to make the Layer widget functional.
[architektonas] / src / mirroraction.cpp
index 500f59d9e6cd89633c1571e85ee2fe8b0de21083..61b14ac1276be53c1199b3b310db421e0ff07834 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "mirroraction.h"
 #include "line.h"
+#include "mathconstants.h"
 #include "painter.h"
 //#include "vector.h"
 
@@ -48,8 +49,13 @@ MirrorAction::~MirrorAction()
                painter->DrawLine(p1, p2);
                painter->DrawHandle(p2);
 
-               QString text = tr("Length: %1 in.");
-               text = text.arg(Vector::Magnitude(p1, p2));
+               double absAngle = (Vector(p2 - p1).Angle()) * RADIANS_TO_DEGREES;
+//             double absLength = Vector(position - endpoint).Magnitude();
+
+               QString text = QChar(0x2221) + QObject::tr(": %1");
+               text = text.arg(absAngle);
+//             QString text = tr("Length: %1 in.");
+//             text = text.arg(Vector::Magnitude(p1, p2));
                painter->DrawInformativeText(text);
        }
 }