X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Farc.h;h=a05a259bd640951ed9530d1d4cc020d1cb98d800;hb=eb711912d64f17cf9c18c74c4d78d9867bd066ad;hp=ee9c567a0b1c038790ad2160b464f20f94cbcb3f;hpb=bd9b40058a376c946318a444dd6c77737ec6ac98;p=architektonas diff --git a/src/arc.h b/src/arc.h index ee9c567..a05a259 100644 --- a/src/arc.h +++ b/src/arc.h @@ -14,25 +14,38 @@ class Arc: public Object virtual bool Collided(Vector); virtual void PointerMoved(Vector); virtual void PointerReleased(void); -// virtual bool NeedsUpdate(void); + virtual bool HitTest(Point); + virtual void Enumerate(FILE *); + virtual Object * Copy(void); + virtual QRectF Extents(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 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__