getZoom

From RPTools Wiki
Revision as of 22:29, 9 February 2023 by Conversion script (talk | contribs) (Conversion script moved page getZoom to GetZoom without leaving a redirect: Converting page title to first-letter uppercase)
Jump to navigation Jump to search

getZoom() Function

Introduced in version 1.4
Returns the current zoom level of the viewport in percentage, where 1 (=100%) is the default. This is the same number as what you find at the bottom of the Maptool window.

Usage

getZoom()

Parameters None.

Examples

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

Zoom in by one 10%

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

Zoom out by 10%

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

See Also