Line(Vector, Vector, Object * p = 0);
~Line();
- virtual void Draw(QPainter *);
+ virtual void Draw(Painter *);
virtual Vector Center(void);
virtual bool Collided(Vector);
virtual void PointerMoved(Vector);
virtual void PointerReleased(void);
- void SetDimensionOnPoint1(Dimension *);
- void SetDimensionOnPoint2(Dimension *);
+ virtual bool HitTest(Point);
+ virtual Vector * GetPointAt(Vector);
+ virtual void Enumerate(FILE *);
+ virtual Object * Copy(void);
+ virtual Vector GetPointAtParameter(double parameter);
+ virtual QRectF Extents(void);
+// virtual ObjectType Type(void);
+ virtual void Translate(Vector);
+ virtual void Rotate(Vector, double);
+ virtual void Scale(Vector, double);
+ void SetDimensionOnLine(Dimension * d = 0);
+ Object * FindAttachedDimension(void);
protected:
- bool HitTest(Point);
- void SaveState(void);
- bool StateChanged(void);
+ void SaveHitState(void);
+ bool HitStateChanged(void);
protected:
Vector endpoint; // Starting point is Object::position
Vector oldPoint; // Used for dragging
private:
- bool dragging;
+ bool draggingLine;
bool draggingHandle1;
bool draggingHandle2;
bool objectWasDragged;
double length;
+ Vector angle;
bool hitPoint1, hitPoint2, hitLine;
bool oldHitPoint1, oldHitPoint2, oldHitLine;
};