Contents

translate

Moves the origin of the canvas coordinate system.

Declaration

void translate(
    unrestricted float tx, 
    unrestricted float ty
);

Parameters

  • tx:

    The x-coordinate in the current canvas coordinate system to be made the new origin.

  • ty:

    The y-coordinate in the current canvas coordinate system to be made the new origin.

Discussion

The specified point x,y in the canvas coordinate system becomes the point 0,0 and the entire coordinate system is translated accordingly.

See Also

Changing the Coordinate System