]> Shamusworld >> Repos - architektonas/blobdiff - src/dimension.h
First stabs at sizing dimension lines properly.
[architektonas] / src / dimension.h
index cea0de1b7b3645c3c5ba09f88f696179b2fda9a3..222675a275b595e10f1752a63bed2132800a2975 100644 (file)
@@ -7,15 +7,16 @@ class Dimension: public Object
 {
        public:
                Dimension(Vector, Vector, Object * p = 0);
+               Dimension(Vector *, Vector *, Object * p = 0);
                ~Dimension();
 
-               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 SetPoint1(Vector);
-               void SetPoint2(Vector);
+               void SetPoint1(Vector *);
+               void SetPoint2(Vector *);
                void FlipSides(void);
 
        protected:
@@ -28,6 +29,9 @@ class Dimension: public Object
                bool draggingHandle2;
                bool objectWasDragged;
                double length;
+
+               Vector * point1;                                        // These couple to external points; if there
+               Vector * point2;                                        // are none then fall back to endpoint/position
 };
 
 #endif // __DIMENSION_H__