Node:Affine Transformations for Polygons, Next:, Previous:Querying Polygons, Up:Polygon Reference



Affine Transformations

Transform rotate (const real x, [const real y = 0, [const real z = 0]]) Virtual function
Transform rotate (const Point& p0, const Point& p1, [const real angle = 180]) Virtual function
Transform rotate (const Path& p, [const real angle = 180]) Virtual function
Transform scale (real x, [real y = 1, [real z = 1]]) Virtual function
Transform shear (real xy, [real xz = 0, [real yx = 0, [real yz = 0, [real zx = 0, [real zy = 0]]]]]) Virtual function
Transform shift (real x, [real y = 0, [real z = 0]]) Virtual function
Transform shift (const Point& p) Virtual function
void shift_times (real x, [real y = 1, [real z = 1]]) Virtual function
void shift_times (const Point& p) Virtual function
The affine transformation functions for Polygon differ from the Path versions only in that center is transformed as well. See Path Reference; Affine Transformations.

Please note, that the classes currently derived from Polygon, namely Reg_Polygon and Rectangle, currently inherit these functions from Polygon. The problem with this is, that they have data members, which are not recalculated when a Reg_Polygon or Rectangle is transformed. I plan to do something about this soon! It will also be necessary to add the function Reg_Polygon::is_reg_polygonal(), in order to test whether operations on a Reg_Polygon have caused it to become irregular and/or non-polygonal. Similarly, the function Rectangle::is_rectangular() must be added, to test whether operations on a Rectangle has caused it to become non-rectangular. See Regular Polygon Reference; Data Members, and Rectangle Reference; Data Members.