#include "rect.h"
#include "vector.h"
-enum ObjectType { OTNone = 0, OTLine, OTCircle, OTEllipse, OTArc, OTPolygon, OTDimension, OTSpline, OTText, OTContainer, OTCount };
+enum ObjectType { OTNone = 0, OTLine, OTCircle, OTEllipse, OTArc, OTPolygon, OTDimension, OTSpline, OTText, OTContainer, OTPolyline, OTCount };
enum DimensionType { DTLinear = 0, DTLinearVert, DTLinearHorz, DTRadial, DTDiametric, DTCircumferential, DTAngular, DTLeader, DTCount };
bool hitPoint[5]; \
bool hitObject; \
Point p[5]; \
- double angle[2]; \
+ double angle[3]; \
double radius[2]; \
double length;
struct Polygon {
OBJECT_COMMON;
+ int sides;
Polygon(): type(OTPolygon), id(Global::objectID++) {}
};
+struct Polyline {
+ OBJECT_COMMON;
+ VPVector objects;
+ bool closed;
+ Object * clicked;
+
+ Polyline(): type(OTPolyline), id(Global::objectID++), selected(false), hovered(false), hitObject(false), clicked(NULL) {}
+ void Add(void * obj) { objects.push_back(obj); }
+ void Add(VPVector objs) { objects.insert(objects.end(), objs.begin(), objs.end()); }
+};
+
struct Spline {
OBJECT_COMMON;
};
#endif // __STRUCTS_H__
-