getViewArea

From RPTools Wiki
Revision as of 23:08, 16 February 2019 by Azhrei (talk | contribs) (Created page with "{{MacroFunction |name= getViewArea |version=1.4 |description= Returns the limits of the visible area of the map window, given in either pixels or cell coordinates depending on...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getViewArea() Function

Introduced in version 1.4
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)]

See Also