Classes

Method XbpPresSpace():setViewPort() Foundation

Sets or returns the size of the viewport.

Syntax
:setViewPort( [<aViewPort>] ) --> aOldViewPort
Parameters
<aViewPort> := { nX1, nY1, nX2, nY2 }
The <aViewPort> parameter is an array of four elements that contain the coordinates for the lower left and upper right corners of the viewport. Including this parameter is optional and sets the size of the viewport.
Return

The :setViewPort() method returns an array of four elements containing the coordinates for the lower left and upper right corners of the viewport. If a new size is set for the viewport, this method returns the previous coordinates of the viewport.

Description

The viewport is important for graphic output in the device context linked to the presentation space. The viewport coordinates are relative to the point {0,0} of the output device or device context. In the viewport itself everything is displayed that is visible in the page of the presentation space. The viewport contents are transferred to the output device (the device context).

When dimensioning the viewport two automatic graphic transformations are performed. One is the transformation of the page to the viewport and the other is the transformation of the viewport to the output device (the device context).

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.