]> Shamusworld >> Repos - architektonas/blob - src/arc.h
Fixes to accomodate object connections.
[architektonas] / src / arc.h
1 #ifndef __ARC_H__
2 #define __ARC_H__
3
4 #include "object.h"
5
6 class Arc: public Object
7 {
8         public:
9                 Arc(Vector, double, double, double, Object * p = 0);
10                 ~Arc();
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                 virtual void Enumerate(FILE *);
18 //              virtual Object * Copy(void);
19
20         private:
21                 bool AngleInArcSpan(double angle);
22
23         protected:
24                 double radius;                                          // Center is Object::position
25                 double startAngle;                                      // Starting angle in radians
26                 double angleSpan;                                       // # of degrees the arc spans in radians
27
28         private:
29                 bool hitHandle1;        // Moving
30                 bool hitHandle2;        // Rotation
31                 bool hitHandle3;        // Setting span of the arc
32                 bool hitHandle4;        // Resizing
33                 bool objectWasDragged;
34                 Vector oldPoint;                                        // Used for dragging
35                 double oldAngle;                                        // Used for user feedback
36                 double oldRadius;                                       // Used for user feedback
37 };
38
39 #endif  // __ARC_H__