 Hello friends, myself, Darshan Pandit, Assistant Professor, Department of Computer Science and Engineering, Walton the Institute of Technology, Solapur. Today we are going to discuss about coloring and other basic functions in computer graphics. So in this at the end of the session student will be able to set different colors and patterns for different graphical objects using various C functions. So in this session we are going to see how to set color, set fill styles, flood fill, out text, x, y, line style, text style and close graph. So set color and style functions. So in this set BK color white, set BK color is a function and white is a color which sets background color to white. This function is set line style. In this we need to pass parameter int, line style, unsigned pattern that is user pattern, you pattern is nothing but user pattern, int, thickness. Line style are 0 for solid line, 1 for dotted line, 2 for centered line, 3 for dashed line and if we specify 4 then it will be user defined line. So here in this int, line style we need to specify 0, 1, 2, 3 or 4 and if 4 is specified then u pattern is a 16 bit pattern. This will be applied when line style user bit pattern is 4. That is when we set line style as 4 then u pattern will be active. Thickness are as normal 1 and thickness 0. If we specify 1 then it will be normal line, if we specify 3 then it will be thick line. Next set color red or we can specify int, num, in this when we specify red, red color border will be set for all object which are placed below set color function. The set color function is used to fill boundary of the object. So let us see the example. So in this program, so first we need to initialize graphics card by giving path of BGI. After that set BK color here we are using white. So background color will be set as white. After that set color red, so red color is applied to this line which is having coordinate 100, 100, 100, 400. After that set color 1. So this will be applied to this line 200, 100, 200, 400 with the line style 303. So in this case set line style 453. So here the line style is 4 and here user bit pattern is 5 and this is the thickness 3. So this 5 will be active when we set u pattern as 4 and this will be applied to this line 300, 100, 300, 400. So in this way you will get the output. So this is the basic line. After that this is the line in which we have not used user bit pattern and the third line green line in which we are using user bit pattern. Next function is flood fill. So flood fill it fills the enclosed area of object like circle, rectangle, polygon etc. So in this int x and int y are known as seed point which should be inside the enclosed area and int border it should be matched with the set color value. After that set fill style it requires parameter int pattern and int color. It specifies the pattern and color in which color will be filled up till the border of the object. So pattern of 12 types are like 1 for solid, 2 for horizontal line, 3 for diagonal lines in this way till 12, 12 pattern we have in int pattern. After that out text xy it requires parameter int x int y and text string. So here it displays the text at specified x and y coordinate. Let us see the example. So in this example set color BK white that is background color is white, set color is 1. After that circle we have drawn with radius 17 at the coordinate position 200, 200. Flood fill style 1, 4. So 1 is the solid pattern and we are filling it with the color specified as 4. After that flood fill so 200, 800 so this is the seed point which is inside the circle and with the border with the solid fill pattern that is 1. So color will be flooded with the solid fill pattern 1. Next circle we have drawn circle with 70 at 350, 350 coordinate. After that set fill style 2, 5. So we have changed the pattern here 2 and different color that is 5. So out text x5 we are displaying circle at this coordinate position 300, 250. So in this way we will get the output 1 with solid pattern and 1 with horizontal pattern and with different color. So let us go with the quiz which function is used to fill color inside the object and second is which function is used to color the boundaries of the object. So first is set color and second is flood fill. Next is set text style it requires parameter in font, in direction, in care size. So it is used to set font style with in font second display of the text in horizontal or vertical direction that is set direction is used to display the text in horizontal or vertical direction after that size of the text. After that close graph it deallocates all memory allocated by graphics system. Secondly it then restores the screen to the mode it was before as you call init graph. So before calling init graph function. So this close graph deallocates all memory allocated by graphic system. So let us see the example. So in this example so here we have used various text at various coordinate we have used waltz on the institute of technology at 10.10 next is 50 comma 100 next coordinate position is 50 comma 200 after that 50 comma 300. So for all these text we have applied different set text style pattern like here 1, 2, 3, 4, 3. So let us see how this pattern will be displayed. So in this way we will get different pattern for different text. So that is horizontally and vertically we can display the text. So these are the references which I have used to create this video. Thank you.