]> Shamusworld >> Repos - architektonas/commitdiff
Added better visual feedback to add Line and Circle tools.
authorShamus Hammons <jlhamm@acm.org>
Wed, 1 Feb 2012 21:44:56 +0000 (21:44 +0000)
committerShamus Hammons <jlhamm@acm.org>
Wed, 1 Feb 2012 21:44:56 +0000 (21:44 +0000)
src/drawcircleaction.cpp
src/drawlineaction.cpp

index fad31580b283bde7e5f9ed4f906660c44bc8e11b..338bd5366b204dd9bb6ce659533d5f849009e4fb 100644 (file)
@@ -32,14 +32,16 @@ DrawCircleAction::~DrawCircleAction()
 
 /*virtual*/ void DrawCircleAction::Draw(Painter * painter)
 {
-       // Need to fix pen colors, etc...
+       painter->SetPen(QPen(Qt::red, 2.0, Qt::DotLine));
+
        // I think stuff like crosshairs should be done in the DrawingView, tho
        if (state == FIRST_POINT)
        {
-               painter->DrawPoint(p1.x, p1.y);
+               painter->DrawHandle(p1);
        }
        else
        {
+               painter->DrawHandle(p1);
                double radius = Vector::Magnitude(p1, p2);
                painter->DrawEllipse(p1, radius, radius);
        }
index ffa2e7eaea35c71cd39ca24be6c9dbe785860eb7..780ad58a66c3fd49f9e563f3156aa3af29ffa98f 100644 (file)
@@ -33,15 +33,17 @@ DrawLineAction::~DrawLineAction()
 
 /*virtual*/ void DrawLineAction::Draw(Painter * painter)
 {
-       // Need to fix pen colors, etc...
+       painter->SetPen(QPen(Qt::red, 2.0, Qt::DotLine));
+
        // I think stuff like crosshairs should be done in the DrawingView, tho
        if (state == FIRST_POINT)
        {
-               painter->DrawPoint(p1.x, p1.y);
+               painter->DrawHandle(p1);
        }
        else
        {
                painter->DrawLine(p1, p2);
+               painter->DrawHandle(p2);
        }
 }