Next: , Previous: Picture Operators, Up: Picture Reference


21.5 Affine Transformations

The functions in this section all operate on the transform data member of the Picture and return a Transform representing the transformation—not transform.

— Function: Transform scale (real x, [real y = 1, [real z = 1]])

Performs transform.scale(x, y, z) and returns the result. This has the effect of scaling all of the elements of shapes and labels.

— Function: Transform shift (real x, [real y = 0, [real z = 0]])

Performs transform.shift(x, y, z) and returns the result. This has the effect of shifting all of the Shapes and Labels on the Picture.

— Function: Transform shift (const Point& p)

Performs transform.shift(p) and returns the result. This has the effect of shifting all of the Shapes and Labels on the Picture by the x, y, and z-coordinates of p.

— Function: Transform rotate (const real x, [const real y = 0, [const real z = 0]])

Performs transform.rotate(x, y, z) and returns the result. This has the effect of rotating all of the elements of shapes and labels.

— Function: Transform rotate (const Point& p0, const Point& p1, [const real angle = 180]);

Performs transform.rotate(p0, p1, angle) and returns the result. This has the effect of rotating all of the elements of shapes and labels about the line from p_0 to p_1.