setZoom: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=setZoom |version=1.4 |description= Sets the zoom level of the viewport. |usage= <source lang="mtmacro" line> setZoom(z) </source> '''Parameters''' * {{cod...")
 
No edit summary
Line 14: Line 14:


|example=
|example=
Set the zoom level to default (= 0)
Zoom in by a factor 2
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: setZoom(0)]
[h: z = getZoom()]
[h: setZoom(2*z)]
</source>
</source>


|also=
|also=
{{func|getZoom}},
{{func|setZoom}},
{{func|goto}},
{{func|getTokenX}},
{{func|getTokenX}},
{{func|getTokenY}}.
{{func|getTokenY}},
{{func|goto}}


}}
}}
[[Category:Miscellaneous Function]]
[[Category:Miscellaneous Function]]

Revision as of 08:30, 30 April 2015

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()

Example

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

See Also