 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can display ellipse in different colors and styles. Before starting you can subscribe my YouTube channel by clicking on the link which is available at the bottom right corner of this video. You can download my app Techimage that is available on Google Play. You can connect with me by following these details which are available in front of you. Now coming on to the topic. In this program I will be implementing ellipse in different colors and styles. For that purpose I have included two header files, graphics.h and corner.h. Then inside main function three variables are declared gd, gm and i. Gd is for graphics driver, gm is for graphics mode. Gd is initialized with detect. It will automatically identify the graphics driver. Then init graph function is implemented. In this function three arguments are passed gd, gm and third argument is a path which is containing libraries of graphics. This path is c, tc and vgi. Now after this I am going to implement a for loop starting from 0 to 15. Inside this for loop I am implementing a function setColor and I am passing i inside it. This function setColor will display foreground color on console. With this i value I will be changing color from 0 to 1, 1 to 2, 2 to 3 every time. So first you can check various colors which are available in graphics.h header file. This is the list of colors. These are constant values and these are numerical values for colors. So I am using values from 0 to 15. You can also write names of colors but then you cannot change their values. That's why I am using numerical values. To display ellipse I am using ellipse function. Now I am passing x and y coordinates then starting and ending angles. So starting angle is 0 and ending angle is 360. Then I am passing x radius and y radius. So this is function call for ellipse. Now I am using getch. This getch will hold the screen. If I press enter key then only different colors of eclipse will be displayed. Sorry ellipse will be displayed. If you want to convert this code into automatic then you have to replace this getch function with delay function. So first I am demonstrating this example. Then I will be using delay function so that this process will be implemented automatically. You can see ellipse is drawn on console. Now I am pressing enter key so that it is changing its color. So this was manual task. Now I am converting it to automatic task. I am using delay function and I am passing 1000 inside it. This 1000 is millisecond. Now I am executing it again. You can see it is changing its color automatically. You can feel it while you will be implementing this code at your own. It has terminated. So this is all about ellipse but this ellipse is not filled. Now I am going to demonstrate you how you can fill this ellipse with different styles. For that purpose I am calling a function that is set fill style. Now I am going into search to see available fill styles. So these fill styles are already available. You can use any particular fill style or you can apply all the fill styles. So I will be demonstrating both of the methods. First I am using this slash underscore fill and second argument is for color. So each ellipse will be having this fill style that is slash fill and with different colors. Then I have to use flood fill function. Inside flood fill I have passed three arguments. X, Y coordinates and I is representing color. So this is complete code. After for loop I have used close graph and then return zero. This is common for all graphics related programs. Now I am executing this code. You can see ellipse is filled with a single style but with different colors and it is changing its color automatically because we have used delay function. Now if you want to apply different different styles then you can use only I because each style has a numerical value starting from zero. This is defined inside enum. So these numerical values are already available so you can simply place I. Now again I am executing this code. You can see ellipse is displaying different different styles in different colors. Now I am going to use another function that is fill ellipse. In this fill ellipse I have to remove these starting and ending angles and this flood fill is not required because fill ellipse replace this flood fill task. It draws an ellipse on console as well as it fills it with a fill style that is available here using set fill function. Set fill style function. Now again I am executing this code. You can see it is displaying different fill styles with different colors and it is changing automatically. So I hope you have understood whatever I have demonstrated to you. I have demonstrated two ellipse functions. First one is normal ellipse function and second one is fill ellipse along with I have demonstrated set color, set fill style and flood fill. So implement this code at your own so that you can understand how it is working. If you want to watch more programming related videos you can subscribe my YouTube channel. Thank you for watching this video.