X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fpath.h;h=c412428a3d072891ae651f59a720572825a58248;hp=fa63cb4651e5a5be6e07d25e8637ab60f9361864;hb=f0b6c9b6b95fde134927c395afbfbbbc057868e6;hpb=dfba002efc3b5f126ddb69e63b9a7dafdd9eacda diff --git a/src/path.h b/src/path.h index fa63cb4..c412428 100644 --- a/src/path.h +++ b/src/path.h @@ -1,13 +1,21 @@ #ifndef _PATH_H #define _PATH_H +#include "transformationtype.h" #include #include #include "rect.h" #include "real.h" +#ifdef TRANSFORM_BEZIERS_TO_PATH + #include "gmprat.h" + #include "paranoidnumber.h" +#endif + + namespace IPDF { + typedef TRect PRect; struct Colour { @@ -26,9 +34,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 +54,9 @@ namespace IPDF std::vector m_fill_points; + PRect m_bounds; + + Colour m_fill; // colour to fill with Colour m_stroke; // colour to outline with };