Specifies the aspect ratio of a window.
void keepaspect(Int32 x, Int32 y)
SUBROUTINE KEEPAS(x, y) INTEGER*4 x, y
The keepaspect subroutine specifies the aspect ratio of a window. It is called at the beginning of a graphics program, but only takes effect when the winopen subroutine is called. The resulting window maintains the aspect ratio specified in the keepaspect subroutine, even if the window changes size.
For example, keepaspect(1,1) always results in a square window. The keepaspect subroutine can also be called in conjunction with the winconstraints subroutine to modify the enforced aspect ratio after the window is created.
With the keepaspect subroutine, the programmer can prevent the user from resizing a window to an aspect ratio that is different from the specified ratio.
Note: This subroutine cannot be used to add to a display list.
|x||Specifies the horizontal proportion of the aspect ratio.|
|y||Specifies the vertical proportion of the aspect ratio.|
The example C language program colored.c uses the keepaspect subroutine to restrict a window to a specific aspect ratio.
This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.
|/usr/include/gl/gl.h||Contains C language constant and variable type definitions for GL.|
|/usr/include/gl/fgl.h||Contains FORTRAN constant and variable type definitions for GL.|
Specifying pixel values to be added to a window with the fudge subroutine.
Constraining the location and size of a window with the prefposition subroutine.
Constraining the size of a window with the prefsize subroutine.
Binding window constraints to the current window with the winconstraints subroutine.
Creating a window with the winopen subroutine.
Creating and Managing Windows.