]> Shamusworld >> Repos - architektonas/blobdiff - src/arc.h
Mirror tool now works successfully for all object types. :-D
[architektonas] / src / arc.h
index 587d0eb5cbf3be72eaf61901890e9876be1df8ad..da0a6ea674375e037bbe33807ef4bf4544824504 100644 (file)
--- a/src/arc.h
+++ b/src/arc.h
@@ -14,28 +14,44 @@ class Arc: public Object
                virtual bool Collided(Vector);
                virtual void PointerMoved(Vector);
                virtual void PointerReleased(void);
+               virtual bool HitTest(Point);
                virtual void Enumerate(FILE *);
+               virtual Object * Copy(void);
                virtual QRectF Extents(void);
-//             virtual Object * Copy(void);
-//             virtual ObjectType Type(void);
+               virtual void Mirror(Point, Point);
+               virtual void Save(void);
+               virtual void Restore(void);
 
        private:
                bool AngleInArcSpan(double angle);
 
+       protected:
+               void SaveHitState(void);
+               bool HitStateChanged(void);
+
        protected:
                double radius;                                          // Center is Object::position
                double startAngle;                                      // Starting angle in radians
                double angleSpan;                                       // # of degrees the arc spans in radians
+               double oldRadius2;
+               double oldStartAngle;
+               double oldAngleSpan;
 
        private:
-               bool hitHandle1;        // Moving
-               bool hitHandle2;        // Rotation
-               bool hitHandle3;        // Setting span of the arc
-               bool hitHandle4;        // Resizing
+//             bool hitHandle1;        // Moving
+//             bool hitHandle2;        // Rotation
+//             bool hitHandle3;        // Setting span of the arc
+//             bool hitHandle4;        // Resizing
+               bool draggingCenter;
+               bool draggingEdge;
+               bool draggingRotate;
+               bool draggingSpan;
                bool objectWasDragged;
                Vector oldPoint;                                        // Used for dragging
                double oldAngle;                                        // Used for user feedback
                double oldRadius;                                       // Used for user feedback
+               bool hitCenter, hitArc, hitRotate, hitSpan;
+               bool oldHitCenter, oldHitArc, oldHitRotate, oldHitSpan;
 };
 
 #endif // __ARC_H__