getViewArea

From RPTools Wiki
Revision as of 13:20, 17 March 2019 by Phergus (talk | contribs)
Jump to navigation Jump to search

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

See Also