setZoom

From RPTools Wiki
Revision as of 08:37, 30 April 2015 by Wolph42 (talk | contribs)
Jump to navigation Jump to search

setZoom() Function

Introduced in version 1.4
Sets the zoom level of the viewport.

Usage

setZoom(z)

Parameters

  • z - The zoom level of the viewport (the current zoom level can be seen at the bottom of the maptool screen. You can also use getZoom()

Examples

Zoom in by a factor 2
[h: z = getZoom()]
[h: setZoom(2*z)]

Zoom in by one step

[h: z = getZoom()]
[h: setZoom(z+1)]

Zoom out by one step

[h: z = getZoom()]
[h: setZoom(z-1)]

See Also