ArticleslgStudy

computer science

Borland Graphics Interface

Borland Graphics Interface is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Borland Graphics Interface rather than just read about it. In short: Borland Graphics Interface, also known as BGI, is a graphics library that was bundled with several Pascal and C++ compilers for MS-DOS sold by Borland. It first shipped with version 4 of Turbo Pascal in 1987.

Borland Graphics Interface — main illustration
Borland Graphics Interface — illustration

Key takeaways

  • Borland Graphics Interface belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Borland Graphics Interface to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Borland Graphics Interface from memory before moving on to harder problems.

Reference excerpt

Borland Graphics Interface, also known as BGI, is a graphics library that was bundled with several Pascal and C++ compilers for MS-DOS sold by Borland. It first shipped with version 4 of Turbo Pascal in 1987. BGI was also used to provide graphics for many other Borland products including the Quattro Pro spreadsheet. BGI was designed for 2D presentation graphics. The library loaded graphic drivers (*.BGI) and vector fonts (*.CHR) from disk in order to provide device independent graphics support. It was possible for the programmer to embed the graphic driver into the executable file by linking the graphic driver as object code with the aid of a utility provided by the compiler (bgiobj.exe). There were graphic drivers for common graphic adapters and printers of that time, such as CGA, EGA, VGA, Hercules, AT&T 400, MCGA and 3270 PC. There also were BGI drivers for some kinds of plotters. The last Borland's C++ IDE for MS-DOS is Borland C++ 3.1 (1992). The last C++ environment which supports BGI is Borland C++ 5.02 (1997), which works under Windows but can compile DOS programs. BGI was accessible in C/C++ with graphics.lib / graphics.h, and in Pascal via the graph unit.

Third-party BGI drivers Given the popularity of Borland compilers, a few independent software developers produced BGI drivers for non-standard video modes, advanced video cards, plotters, printers, and graphics file output. In 1994 Jordan Hargraphix Software released SVGA BGI drivers version 5.5 that are compatible with some SVGA hardware like ATI or Cirrus Logic cards and VESA VBE-compatible cards. Also there are tweaked VGA drivers for non-standard graphic modes supported by VGA by writing directly into its registers, protected mode driver versions for Turbo Pascal 7.0 and mouse driver (actually cursor handler for unsupported video modes by standard mouse drivers). These drivers were shareware and buying them let receiving their source code and technical support; now they are no longer supported, but on 19 December 2020 Jordan Hargrave kindly released source code under the MIT License on GitHub. Main bugs are lack of aligning bytes support in VESA true-color modes (so the true-color driver is not suitable for Nvidia graphic cards) and video memory bank switching bug in mouse driver (since real mode addressing space is 1 megabyte, but some video modes require up to 4 megabytes of memory, it is split into 64 kilobyte banks).

Legacy A BGI-compatible library, named Graph, is included in the Free Pascal Pascal compiler. Several BGI implementations for present-day operating systems are also available (see External links.)

Example The following program, written for Turbo C, initialises the graphics and draws 1000 random lines:

See also Allegro Graphics System Extension (GSX) Graphical Kernel System (GKS) Raylib SciTech SNAP UniVBE

References

Turbo C++ 3.0 User's Guide. Borland International, Inc. 1992. Borland C++ Library Reference. Borland International, Inc. 1992. Borland Graphics Interface (BGI) Documentation

External links SDL_bgi is a multiplatform port written in SDL2; it provides several extensions. Winbgim is a port of BGI for Microsoft Windows; it provides several extensions. The GRX graphics library contains a BGI subsystem, mostly compatible with the original BGI. OpenBGI library is another port for Microsoft Windows. libgraph is a BGI implementation for Linux written in SDL1. Fileformat.info page about chr contains some information on how to decode Borland CHR font. sunet.se ftp mirror with some CHR font tools.

Illustrations

Borland Graphics Interface illustration

Worked examples

Example 1 — a first encounter with Borland Graphics Interface

Start with the simplest possible case. Write down what Borland Graphics Interface claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Borland Graphics Interface before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Borland Graphics Interface ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Borland Graphics Interface

In research
Borland Graphics Interface appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Borland Graphics Interface in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Borland Graphics Interface is common in secondary-school and first-year university syllabi. It links to neighbouring topics Borland software, C++ libraries, C (programming language) libraries, so understanding it makes those chapters shorter.
In everyday life
Look for Borland Graphics Interface outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Borland Graphics Interface” →

How to study Borland Graphics Interface in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Borland Graphics Interface means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Borland Graphics Interface out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Borland Graphics Interface in simple terms?

Borland Graphics Interface, also known as BGI, is a graphics library that was bundled with several Pascal and C++ compilers for MS-DOS sold by Borland. It first shipped with version 4 of Turbo Pascal in 1987.

Why does Borland Graphics Interface matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Borland Graphics Interface?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Borland Graphics Interface.

Tags

  • Borland software
  • C++ libraries
  • C (programming language) libraries
  • Graphics libraries

Keep exploring