added constructors for building ExPolygon from Points array and a pair of Points arrays (used in tests)

This commit is contained in:
Joseph Lenox 2018-07-30 22:37:58 -05:00
parent 60bd9b4707
commit 88e03c0b2c

View File

@ -20,6 +20,9 @@ class ExPolygon
Polygons holes;
ExPolygon() {};
explicit ExPolygon(const Polygon &_contour) : contour(_contour) {};
explicit ExPolygon(const Points &_contour) : contour(Polygon(_contour)) {};
/// Constructor to build a single holed
explicit ExPolygon(const Points &_contour, const Points &_hole) : contour(Polygon(_contour)), holes(Polygons(Polygon(_hole))) { };
operator Points() const;
operator Polygons() const;
void scale(double factor);