New method to rotate only polygons, not translate.

New free function to_polygons. Whithout this function one needs to construct the ExPolygonCollection, which means a deep copy.
This commit is contained in:
bubnikv 2016-04-10 19:12:32 +02:00
parent 023310882f
commit bcfbe02c8d
2 changed files with 36 additions and 0 deletions

View file

@ -52,6 +52,15 @@ ExPolygon::translate(double x, double y)
}
}
void
ExPolygon::rotate(double angle)
{
contour.rotate(angle);
for (Polygons::iterator it = holes.begin(); it != holes.end(); ++it) {
(*it).rotate(angle);
}
}
void
ExPolygon::rotate(double angle, const Point &center)
{