GINO Graphics Suite - GINO v9.0  

gEnqViewportState

Syntax

[C/C++:]
void gEnqViewportState(int *swi, int *clp, GLIMIT *limit);
[F90:]
subroutine gEnqViewportState(swi, clp, limit)

integer, intent(out) :: swi,clp
type (GLIMIT), intent(out) :: limit

Arguments

swi
Viewport scaling switch

= GCENTRAL, Keep aspect ratio and centre in viewport
= GBOTTOMLEFT, Keep aspect ratio and place at bottom left of viewport
= GDEFORMED, Allow deformation of picture

clp
Viewport clipping switch

= GOFF, Do not clip to viewport limits
= GON, Clip to viewport limits

limit
Viewport coordinate range in current paper units

Description

The routine gEnqViewportState() returns the current viewport state.

The variable swi returns the viewport scaling switch as set by gSetViewportMode(). The switch determines whether a viewport transformation set by gSetViewport2D() should keep the aspect ratio of the picture coordinate area or allow deformation.

The variable clp returns the setting of the viewport clipping switch as set by gSetViewportClipSwitch(). The default setting of clp = GON implies that the setting of a viewport with gSetViewport2D() will also set the clipping limits to the same area, effectively restricting drawing to those viewport limits. Where the viewport clipping switch is set to GOFF, any future viewport setting will act simply as a mapping operation and window limits may extend outside the viewport limits.

The remaining arguments return the actual viewport limits of the current viewport in paper units. This may vary from the requested viewport limits returned by gEnqViewport2D() depending on the current viewport scaling switch (swi) but represents the actual limits of the specified picture region on the drawing area.

See Also

gEnqViewportState Usage
gSetViewport2D
gEnqViewport2D
gSetViewportClipSwitch
gSetViewportMode