getViewArea: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{MacroFunction | {{MacroFunction | ||
|name= getViewArea | |name= getViewArea | ||
|version= | |version=1.5.0 | ||
|description= | |description= | ||
Returns the limits of the visible area of the map window, given in either pixels or cell coordinates depending on the first parameter. | Returns the limits of the visible area of the map window, given in either pixels or cell coordinates depending on the first parameter. |
Revision as of 13:20, 17 March 2019
getViewArea() Function
• Introduced in version 1.5.0
Returns the limits of the visible area of the map window, given in either pixels or cell coordinates depending on the first parameter.
Usage
getViewArea(pixels)
Parameters
pixels
- if set to true (1) means the returned coordinates are measured in pixels. If set to false (0) the returned coordinates are measured in map cells.
Examples
Get the viewport dimensions of the current client in cells:
[h:getViewArea(0)]
Get the viewport dimensions of the current client in pixels:
[h:getViewArea(1)]