Getting the aspect details


Often the screen is not perfectly square and it would be nice to use the extra space without having to turn clipping off. The following routines are provided to get the values needed to adjust the calls to viewport, etc as needed.


getaspect()

Returns the ratio height over width of the display device.

    Fortran:
         real function getaspect()

    C:
         float vogle_getaspect()

    Pascal:
         function GetAspect(): real;

getfactors(wfact, hfact)

Returns wfact as the width over min(width of device, height of device) and hfact as the height over min(width of device, height of device).

    Fortran:
         subroutine getfactors(w, h)
         real w, h

    C:
         vogle_getfactors(w, h)
              float     *w, *h;

    Pascal:
         procedure GetFactors(var w, h: real)

getdisplaysize(w, h)

Returns the width and height of the device in pixels in w and h respectively.

    Fortran:
         subroutine getdisplaysize(w, h)
         real w, h

    C:
         vogle_getdisplaysize(w, h)
              float     *w, *h;

    Pascal:
         procedure GetDisplaySize(var w, h: real)