]> Shamusworld >> Repos - architektonas/blobdiff - src/dimension.cpp
Added new toolbar icons, added arrowhead rendering to Painter class.
[architektonas] / src / dimension.cpp
index 9ba0ed5a0b82638e67e4705b75d777add76129da..b433cac32fa47ad7a6486cca1ac0f3d3c6651392 100644 (file)
@@ -72,8 +72,31 @@ Dimension::~Dimension()
        painter->DrawLine(p3, p5);
        painter->DrawLine(p4, p6);
 
+       painter->SetBrush(QBrush(QColor(Qt::blue)));
+       painter->DrawArrowhead(p1, p2);
+       painter->DrawArrowhead(p2, p1);
+#if 0
+       // Draw arrowheads, dots, etc :-P
+       // NOTE: These need some kind of enum in the header so that they can
+       //       be created with some kind of user control...
+
+       Point p7 = position + (unit * 9.0);
+       Point p8 = endpoint - (unit * 9.0);
+       Point p9 = p7 + (orthogonal * 7.0);
+       Point p10 = p7 + (orthogonal * 13.0);
+       Point p11 = p8 + (orthogonal * 7.0);
+       Point p12 = p8 + (orthogonal * 13.0);
+
+       painter->DrawLine(p1, p9);
+       painter->DrawLine(p9, p10);
+       painter->DrawLine(p10, p1);
+       painter->DrawLine(p2, p11);
+       painter->DrawLine(p11, p12);
+       painter->DrawLine(p12, p2);
+#endif
+
        // Draw length of dimension line...
-       painter->SetFont(QFont("Arial", 10));
+       painter->SetFont(QFont("Arial", 10 * Painter::zoom));
        Vector v1((p1.x - p2.x) / 2.0, (p1.y - p2.y) / 2.0);
        Point ctr = p2 + v1;
        // This is in pixels, which isn't even remotely correct... !!! FIX !!!