X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Farc.cpp;h=a4efa39de9c03b2f4922907d6737188dda986f04;hb=eb0057e8a8145032152e4c417fcd102ef5a21484;hp=c9eab157d06a95676328644cc9fe388646154c2b;hpb=baf67656b97e3d61e9223e66ebe4f554e364cd4a;p=architektonas diff --git a/src/arc.cpp b/src/arc.cpp index c9eab15..a4efa39 100644 --- a/src/arc.cpp +++ b/src/arc.cpp @@ -24,10 +24,12 @@ Arc::Arc(Vector p1, double r, double a1, double a2, Object * p/*= NULL*/): Objec { } + Arc::~Arc() { } + /*virtual*/ void Arc::Draw(Painter * painter) { QPen pen; @@ -117,11 +119,13 @@ Arc::~Arc() painter->DrawArc(position, radius, startAngle, angleSpan); } + /*virtual*/ Vector Arc::Center(void) { return position; } + /* We need at least *four* handles for this object: - one for moving @@ -225,6 +229,7 @@ so let's do like this: return false; } + /*virtual*/ void Arc::PointerMoved(Vector point) { // The TLC will send these messages if the object is selected but not clicked on. @@ -265,6 +270,7 @@ so let's do like this: needUpdate = true; } + /*virtual*/ void Arc::PointerReleased(void) { hitHandle1 = hitHandle2 = hitHandle3 = hitHandle4 = false; @@ -293,6 +299,7 @@ but this is actually more compact and cleaner. } #endif + /* start = 350, span = 20, end = 10, angle = 5 angle < start, so angle = 365 @@ -312,3 +319,10 @@ bool Arc::AngleInArcSpan(double angle) return (passedInSpan <= angleSpan ? true : false); } + + +/*virtual*/ void Arc::Enumerate(FILE * file) +{ + fprintf(file, "ARC (%lf,%lf) %lf, %lf, %lf\n", position.x, position.y, radius, startAngle, angleSpan); +} +