X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fpath.h;h=eb2b7b7f33d953a64cfca28f7eca015212910bff;hp=fa63cb4651e5a5be6e07d25e8637ab60f9361864;hb=ef0af5fd0129161a9e079bd3cd1298b53f1fe11a;hpb=dfba002efc3b5f126ddb69e63b9a7dafdd9eacda diff --git a/src/path.h b/src/path.h index fa63cb4..eb2b7b7 100644 --- a/src/path.h +++ b/src/path.h @@ -6,6 +6,15 @@ #include "rect.h" #include "real.h" +#ifdef QUADTREE_DISABLED + +#define TRANSFORM_BEZIERS_TO_PATH +#ifdef TRANSFORM_BEZIERS_TO_PATH +#include "gmprat.h" +#endif + +#endif + namespace IPDF { @@ -26,9 +35,10 @@ namespace IPDF 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 & FillPoints(const Objects & objects, const View & view); // Is point inside shape? @@ -45,6 +55,13 @@ namespace IPDF std::vector m_fill_points; + #ifdef TRANSFORM_BEZIERS_TO_PATH + Gmprat x; + Gmprat y; + Gmprat w; + Gmprat h; + #endif + Colour m_fill; // colour to fill with Colour m_stroke; // colour to outline with };