Home Docs
Graphics.h Documentation
Compiler

Getting Started

What is graphics.h?

graphics.h is a classic 2D graphics library used with Borland Turbo C for simple graphical programming. It came with the Borland Graphics Interface (BGI), allowing students to draw shapes, print text, set colors, and build basic animations in C.

Why Does graphics.h Still Exist?

Today, graphics.h is mostly used in academic environments and legacy systems. It is still part of many school, diploma, and first-year university syllabi because it is simple, lightweight, and useful for teaching coordinate systems and drawing fundamentals.

This documentation exists mainly to support students who are required to learn graphics.h in coursework, lab assignments, and introductory computer graphics subjects.

Continue with Graphics Initialization when you are ready to set up your first graphics mode.

Turbo C vs Modern Compilers (MinGW, GCC, etc.)

Turbo C (Legacy)

Released in the late 1980s, DOS-based, 16-bit, and bundled with BGI-based graphics.h.

Limitations: very old, not natively compatible with modern systems, and often needs DOSBox/emulation.

MinGW / GCC (Modern)

Modern 32-bit/64-bit compilers used on Windows, Linux, and macOS for real-world C/C++ development.

Important: graphics.h is not included by default. External libraries are required for graphics work.

In short: Turbo C is a legacy academic tool; modern compilers are for current professional development.

Important Note

graphics.h is not part of standard C. It is specific to Borland Turbo C and a few third-party ports. If your goal is industry-level C/C++ development, you should move to modern graphics stacks.

Modern Alternatives to graphics.h

There are far better alternatives for practical development today:

  • SDL (Simple DirectMedia Layer)
  • SFML (Simple and Fast Multimedia Library)
  • OpenGL
  • GLFW
  • DirectX
  • Qt

These options are modern, cross-platform, and suitable for real projects, tools, and games. Use graphics.h for concept learning, then transition to these libraries for production-ready work.

To continue learning shapes in this course-first path, open Drawing Functions or Colors & Fill.

Why This Documentation Exists

This independent resource is built to:

  • Help students complete academic assignments faster.
  • Explain graphics.h functions in clear, structured language.
  • Provide guided learning paths through related topics.
  • Offer an easier practice flow with the online compiler.
  • Reduce dependency on old DOS-based setups.

It is a community educational resource and is not affiliated with Borland.

Next Steps Start with Graphics Initialization, then continue to line(), circle(), and Text & Fonts.