In this video session we are talking about the use of graphics in C++ console programs. There is complete example of instms that is demonstrated in this video tutorial to draw animation of circles.
https://www.instms.com/cpp/examples/a...
We learn about different graphics.h functions such as initwindow, cleardevice() and setfillstyle. These all functions are used in drawing of various patterned circle objects. The properties of each circle is randomized using rand() function. We have randomize the following properties of circle objects.
1. Radius of Circle
2. Top position
3. Left coordinate
4. Color
5. Fill Style
This complete example also useful to understand the development process of screensaver programs. We put count of object going to be drawn on canvas. For this purpose we set a variable and initialize it with 0. The value of this counter variable is incremented each time when new object is drawn. As the value approaches to 20 it clear the canvas and start counting from 1.
Some important functions of graphics.h that are discussed in this session are.
1. initwindow()
2. kbhit()
3. delay()
4. cleardevice()
5. closegraph()