Drawing Circle in Graphics Mode.
⦁ Computer graphics is an art of drawing pictures, lines, charts, etc using computers with the help of programming. Computer is made up of number of pixels.
⦁ In this program we first initialize graphics mode, by passing graphics driver(DETECT), default graphics mode and specifies the directory path where initgraph looks for graphics drivers (* BGI).
⦁ Setting graphics driver as DETECT, means instructing the compiler to auto detect graphics driver.
⦁ Graphics functions used in this program are:
1. initgraph - It initializes the graphics system by loading the passed graphics driver then changing the system into graphics mode.
2. getmaxx - It returns the maximum X coordinate in current graphics mode and driver.
3. getmaxy - It returns the maximum Y coordinate i current graphics mode and driver.
4. outtextxy - It displays a string at a particular point(x,y) on screen.
5. circle - It draws a circle with radius r and center at(x,y).
6. closegraph - It unloads the graphics drivers and sets the screen back to text mode.
--------------------------------------------------------------------------------------------------------------------------
EmoticonEmoticon