SETMAPVIEWPORT

Top  Previous  Next

Syntax

SETMAPVIEWPORT(map as POINTER,vpRect as WINRECT)

Description

Sets the rendering viewport of the map.

Parameters

map - Map pointer returned by the NEWMAP function

vpRect - Rectangle describing the viewport

Return value

None

Remarks

The view port is a rectangular area that the map is rendered into this is set by default to the same size as the screen dimensions. You can restrict the area the map renders into by defining the viewport rectangle. When using a viewport the map automatically shifts the map rendering to match the upper left corner of the viewport as position 0,0.

See Also: DRAWMAP

Example usage

'assuming a 640 x 480 screen size
'dont render the map on the first 40 lines
DEF vp as WINRECT
vp.top = 40
vp.bottom = 480
vp.left = 0
vp.right =  640
SETMAPVIEWPORT map, vp