]> Shamusworld >> Repos - architektonas/blob - src/circle.h
Added Architektonas drawing file loading/saving infrastructure.
[architektonas] / src / circle.h
1 #ifndef __CIRCLE_H__
2 #define __CIRCLE_H__
3
4 #include "object.h"
5
6 class Circle: public Object
7 {
8         public:
9                 Circle(Vector, double, Object * p = 0);
10                 ~Circle();
11
12                 virtual void Draw(Painter *);
13                 virtual Vector Center(void);
14                 virtual bool Collided(Vector);
15                 virtual void PointerMoved(Vector);
16                 virtual void PointerReleased(void);
17
18         protected:
19                 bool HitTest(Point);
20                 void SaveState(void);
21                 bool StateChanged(void);
22
23         protected:
24                 double radius;                                          // Center is Object::position
25                 Vector dragPoint;                                       // Used for rendering edge dragging
26
27         private:
28                 bool draggingEdge;
29                 bool draggingCenter;
30                 bool objectWasDragged;
31                 bool hitCenter, hitCircle;
32                 bool oldHitCenter, oldHitCircle;
33 };
34
35 #endif  // __CIRCLE_H__