getViewArea: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(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...")
 
No edit summary
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name= getViewArea
|name= getViewArea
|version=1.4
|version=Nerps 1.4
|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:14, 17 March 2019

getViewArea() Function

Introduced in version Nerps 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