4 #include "transformationtype.h"
10 #ifdef TRANSFORM_BEZIERS_TO_PATH
12 #include "paranoidnumber.h"
18 #ifdef TRANSFORM_BEZIERS_TO_PATH
23 typedef TRect<PReal> PRect;
27 uint8_t r; uint8_t g; uint8_t b; uint8_t a;
29 Colour(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a) : r(_r), g(_g), b(_b), a(_a) {}
30 bool operator==(const Colour & c) const
32 return (r == c.r && g == c.g && b == c.b && a == c.a);
34 bool operator!=(const Colour & c) const {return !this->operator==(c);}
42 Path(Objects & objects, unsigned _start, unsigned _end, const Colour & _fill = Colour(128,128,128,255), const Colour & _stroke = Colour(0,0,0,0));
44 Rect SolveBounds(const Objects & objects);
45 Rect & GetBounds(Objects & objects);
46 std::vector<Vec2> & FillPoints(const Objects & objects, const View & view);
48 // Is point inside shape?
49 bool PointInside(const Objects & objects, const Vec2 & pt, bool debug=false) const;
51 unsigned m_start; // First bounding Bezier index
52 unsigned m_end; // Last (inclusive) '' ''
53 unsigned m_index; // index into Objects array
60 std::vector<Vec2> m_fill_points;
65 Colour m_fill; // colour to fill with
66 Colour m_stroke; // colour to outline with