First Turbo Graphics Program in C Language
First Graphic Program
1 2 3 4 5 6 7 8 9 10 11 12 | #include<graphics.h> #include<conio.h> void main() { int gd = DETECT, gm; initgraph(&gd, &gm, "c:\\tc\\bgi"); circle(300, 300, 50); getch(); closegraph(); } |
Requirement to Run This Program
- Graphics.h Header File
- Graphics.lib library file
- Graphics driver (BGI file)
- 640×480 VGA monitor
Header File : graphics.h |
|
You must Know Following Things before Learning Turbo Graphics
InitGraph :
- Initializes the graphics system.
- In C Program execution starts with main() similarly Graphics Environment Starts with this function.
- initgraph() initializes the graphics system by loading a graphics driver from disk (or validating a registered driver) then putting the system into graphics mode
As this is Our first topic Under Graphics so it is better not to go in details of Parameters.