]> Shamusworld >> Repos - architektonas/blobdiff - src/arc.cpp
In the middle of refactoring objects for loading/saving.
[architektonas] / src / arc.cpp
index c9eab157d06a95676328644cc9fe388646154c2b..a4efa39de9c03b2f4922907d6737188dda986f04 100644 (file)
@@ -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);
+}
+