Borland Graphics Interface
Borland Graphics Interface is a graphics API developed by Borland in 1987. It allows developers to call graphics functions and the routine will draw similarly looking graphics on any supported device rather than require the developer to program to each different form of hardware directly. For example, the illustration to the right demonstrates a similar screen on six different hardware configurations all using the same code. The API was initially written in Turbo C and first released in 1987, last updated in 1992, and discontinued in 1997.
The API was designed for ease of use rather than be optimized for speed, so it is not suitable for any programs which require frequent or complex screen updates. Despite its slowness, BGI was especially popular in the late 1980s and early 1990s because it was included in most of Borland's DOS-based languages, so it was used in hundreds of video games and applications. Some of the BGI functions include customizing the color palette, drawing primitives (pixel set and read, line, box, circle, ellipse, arc, polygon, fill, fill with pattern, etc.), bitmap drawing, paging, mouse control, and a custom font handler.
|AT&T Graphics||ATT.BGI||1, 2, 3||A special driver for AT&T's less-popular line of PCs.|
|Color Graphics Adapter||CGA.BGI||1, 2, 3||Standard CGA.|
|Debugger||DEBUG.BGI||2||Used for debugging.|
|Enhanced Graphics Adapter/Video Graphics Array||EGAVGA.BGI||1, 2, 3||Combined EGA and VGA into a single driver.|
|Hercules Graphics Card||HERC.BGI||1, 2, 3||For the monochrome Hercules.|
|IBM 8514||IBM8514.BGI||2, 3||IBM's high-resolution adapter used on the PS/2.|
|IBM 3270 PC||PC3270.BGI||2, 3||IBM's 3270 emulator PC.|
|Video Electronics Standards Association||VESA16.BGI||3||VESA Super VGA.|
|Video Electronics Standards Association||VESA256.BGI||2||VESA Super VGA.|
|Video Graphics Array||VGA16.BGI||2||A VGA-only driver.|
|Video Graphics Array||VGA256.BGI||2||A VGA-only driver.|
Third Party Support
Not long after Borland released the specifications for their graphics API, third party developers began creating their own drivers. They initially began modifying the existing drivers to support the non-standard modes of VGA and then expanded SVGA support to Tseng, S3, and several others, since Borland only supported VESA. Drivers were even made which supported printers, plotters, and graphics files so the same drawing commands used for the screen could be sent to a printer.
BGI also formed the foundation of the Remote Imaging Protocol (RIP) graphics format, a vector graphic designed to be viewable over slow modem connections.
Along with their graphic driver, Borland created a custom vector font format called the BGI Stroked Font. The format uses straight lines only (no curves) to draw out characters, and doesn't support filling. Borland released 10 official fonts with their API, but, over the years, third parties created their own fonts to work with the driver. I have reverse-engineered the font format and wrote a viewer program for the DOS Game Modding WIki.
Since BGI has long since been made obsolete, I'm releasing my collection of BGI-related software. These downloads include every version of the official and third party Borland BGI driver I could find, every official and third party BGI font (CHR extension) I could find, and software and source code related to BGI.