Draw a fill color in circle using C Graphics
Functions
- setfillstyle
Different fill style :- EMPTY_FILL, SOLID_FILL, LIN_FILL, CTSLASH_FILL, SLASH_FILL, LTBKSLASH_FILL, HATCH_FILL, XHATCH_FILL, INTERLEAVE_FILL, WIDE_DOT_FILL,CLOSE_DOT_FILL, USER_FILL .
#include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> int main() { int gdriver = DETECT,gmode; initgraph(&gdriver,&gmode,"C:\\TC\\BGI"); setfillstyle(SOLID_FILL,RED); circle(200,200,50); floodfill(202,202,15); getch(); }Output:-
Draw a fill circle using C Graphics ( CLOSE_DOT_FILL ) style
#include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> int main() { int gdriver = DETECT,gmode; initgraph(&gdriver,&gmode,"C:\\TC\\BGI"); setfillstyle(CLOSE_DOT_FILL,GREEN); circle(200,200,100); floodfill(202,202,15); getch(); closegraph(); }
Output :-
0 Comments