Abstract

This chapter discusses the Borland graphics interface. Borland C provides a set of routines that are automatically linked into programs when they are needed. This set of routines is called the run-time library. The run-time library contains interfaces to a set of graphics routines. The code for the routines is not kept in the run-time library, but in separate files on the disk. This allows the program to figure out the monitor type AT RUN TIME, and bring in only the code needed for the monitor being used. This allows the executable file to be such as the video graphics array (VGA), support many modes. The pixels in VGAHI mode are square; however, in all other modes, they are rectangular. The ratio of the length to the width of a pixel is called the aspect ratio. To be precise, the aspect ratio is the size of the pixel in the X dimension divided by its size in the Y dimension. A square pixel has an aspect ratio of 1. Borland's graphics routines automatically take the aspect ratio into account. There are two functions for dealing with the aspect ratio—getaspectratio( ) and setaspectratio( )—however, they are rarely ever needed, as BGI routines automatically adjust for aspect ratio.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call