Keep aspect ratio and centre in viewport (default)
= GBOTTOMLEFT,
Keep aspect ratio and place at bottom left of viewport
= GDEFORMED,
Allow deformation of picture
Description
The routine gSetViewportMode() determines whether a viewport transformation set by gSetViewport2D() should keep the aspect ratio of the picture coordinate area or allow deformation.
If sw = GCENTRAL the picture area is centred in the viewport in either the vertical or horizontal direction as appropriate, whereas if sw = GBOTTOMLEFT the picture area is placed at the bottom left of the viewport. In both these cases the aspect ratio of the picture is kept by calculating the minimum scale value required to fit the picture coordinate area into the viewport area.
If sw = GDEFORMED the exact values of both the picture and viewport limits are used to calculate the viewport transformation which may allow different scales in the horizontal and vertical directions and so deform the picture.
The routine gSetViewportMode() must be called before gSetViewport2D() to have an effect on the viewport transformation.
If sw is out of range, a warning message is output and the default viewport scaling is used.