Contents

scale

Scales the canvas coordinate system horizontally and vertically.

Declaration

void scale(
    unrestricted float sx, 
    unrestricted float sy
);

Parameters

  • sx:

    The horizontal scalar.

  • sy:

    The vertical scalar.

Discussion

Drawing operations can be scaled up or down by setting the scale. All drawing operation x and y coordinates, widths and heights are multiplied by the scalars. The scalars must be nonzero, but may be negative (which reverses the sign of subsequent x and y coordinates.

See Also

Changing the Coordinate System