Next Previous Contents

3.243 tgi_setaspectratio

Function

Set the pixel aspect ratio.

Header

tgi.h

Declaration

void __fastcall__ tgi_setaspectratio (unsigned ratio);

Description

The function sets the pixel aspect ratio for the current driver and display. The argument is an 8.8 fixed point value. The aspect ratio may be used to correct geometric shapes so they look correct on a given display. As an example, a circle with a radius of 100 pixels may look elliptic on some driver/display combinations if the aspect ratio is not 1.00.

Limits

  • The aspect ratio is encoded in the TGI driver which assumes a "standard" monitor for the given platform. The aspect ratio may be wrong if another monitor is used.
  • No TGI function will use the aspect ratio. It is up to the programmer to make use of it.
  • The tgi_setaspectratio function can be used to change the aspect ratio for a loaded driver. The value is not reset by tgi_init, so if a driver is linked statically to an application, switching into and out of graphics mode will not restore the original aspect ratio.

Availability

cc65

See also

tgi_getaspectratio

Example

None.


Next Previous Contents