GINO Graphics Suite - GINO v9.0  

gSetViewport

Syntax

[C/C++:]
void gSetViewport2D(GLIMIT *piclim2, GLIMIT *viewlim);
void gSetViewport3D(GLIMIT3 *piclim3, GLIMIT *viewlim);
[F90:]
subroutine gSetViewport2D(piclim2, viewlim)
subroutine gSetViewport3D(piclim3, viewlim)
type (GLIMIT), intent(in) :: piclim2,viewlim
type (GLIMIT3), intent(in) :: piclim3

Arguments

piclim2
2D picture coordinate limits

piclim3
3D picture coordinate limits

viewlim
Viewport coordinate limits in current paper units

Description

The routines gSetViewport2D() and gSetViewport3D() set up a viewport mapping from user picture coordinates in 2D or 3D  to device or paper coordinates. The picture limits may cover any range but the viewport limits must lie within the range of the current device or paper limits. Viewport limits are in millimetres unless gDefinePictureUnits() has been called.

Once a viewport mapping is set up, all subsequent drawing and enquiry routines are affected by it. Thus any range of picture coordinates may be mapped onto any area of the device or paper.

The routine gSetViewportMode() controls the position of the viewport and whether the requested mapping is allowed to deform the picture.

If the viewport limits have a zero range or are completely outside the device limits an error message is output and the viewport transformation is unchanged. If the viewport limits are larger than the device limits, the viewport is clipped to the device limits for windowing purposes but the transformation is calculated according to the requested limits.

See Also

gSetViewport2D Usage
gDefinePictureUnits
gSetViewportMode