Totally FITH everything
[ipdf/code.git] / src / path.h
index 1a0ed53..2aa7840 100644 (file)
@@ -1,13 +1,26 @@
 #ifndef _PATH_H
 #define _PATH_H
 
+#include "transformationtype.h"
 #include <vector>
 #include <algorithm>
 #include "rect.h"
 #include "real.h"
 
+#ifdef TRANSFORM_BEZIERS_TO_PATH
+       #include "gmprat.h"
+
+#endif
+
+
 namespace IPDF
 {
+       #ifdef TRANSFORM_BEZIERS_TO_PATH
+               typedef Gmprat PReal;
+       #else
+               typedef Real PReal;
+       #endif
+       typedef TRect<PReal> PRect;
        
        struct Colour
        {
@@ -22,12 +35,15 @@ namespace IPDF
        };
        
        class Objects;
+       class View;
        
        struct Path
        {
-               Path(const Objects & objects, unsigned _start, unsigned _end, const Colour & _fill = Colour(128,128,128,255), const Colour & _stroke = Colour(0,0,0,0));
+               Path(Objects & objects, unsigned _start, unsigned _end, const Colour & _fill = Colour(128,128,128,255), const Colour & _stroke = Colour(0,0,0,0));
                
-               Rect SolveBounds(const Objects & objects) const;
+               Rect SolveBounds(const Objects & objects);
+               Rect & GetBounds(Objects & objects);
+               std::vector<Vec2> & FillPoints(const Objects & objects, const View & view);
                
                // Is point inside shape?
                bool PointInside(const Objects & objects, const Vec2 & pt, bool debug=false) const;
@@ -43,6 +59,9 @@ namespace IPDF
                
                std::vector<Vec2> m_fill_points;
                
+               PRect m_bounds;
+
+               
                Colour m_fill;  // colour to fill with  
                Colour m_stroke; // colour to outline with
        };

UCC git Repository :: git.ucc.asn.au