X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcircle.h;h=b12ae99d44b1346f36c9ed16d76ec627de537f4a;hb=669a05b5a52bd759f0ea08772e0ed17222b015a0;hp=e4b384526a484fc4a5abffaed40bdd68e64511c6;hpb=9f6ad3fe0b9cb30115a5d38e8af3aebed0d70c08;p=architektonas diff --git a/src/circle.h b/src/circle.h index e4b3845..b12ae99 100644 --- a/src/circle.h +++ b/src/circle.h @@ -9,23 +9,31 @@ class Circle: public Object Circle(Vector, double, Object * p = 0); ~Circle(); - virtual void Draw(QPainter *); + virtual void Draw(Painter *); virtual Vector Center(void); 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); + + protected: + void SaveHitState(void); + bool HitStateChanged(void); protected: double radius; // Center is Object::position - Vector oldPoint; // Used for dragging + Vector dragPoint; // Used for rendering edge dragging private: - bool dragging; - bool draggingHandle1; - bool draggingHandle2; -// bool needUpdate; + bool draggingEdge; + bool draggingCenter; bool objectWasDragged; + bool hitCenter, hitCircle; + bool oldHitCenter, oldHitCircle; + double oldRadius; }; #endif // __CIRCLE_H__