From 00ca876b01af5bb62df812dec6d10298773b02bd Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Wed, 1 Feb 2012 21:44:56 +0000 Subject: [PATCH] Added better visual feedback to add Line and Circle tools. --- src/drawcircleaction.cpp | 6 ++++-- src/drawlineaction.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/drawcircleaction.cpp b/src/drawcircleaction.cpp index fad3158..338bd53 100644 --- a/src/drawcircleaction.cpp +++ b/src/drawcircleaction.cpp @@ -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); } diff --git a/src/drawlineaction.cpp b/src/drawlineaction.cpp index ffa2e7e..780ad58 100644 --- a/src/drawlineaction.cpp +++ b/src/drawlineaction.cpp @@ -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); } } -- 2.37.2