adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Draw a fill color in circle using C Graphics

Draw a fill color in circle using C Graphics

Functions


  • setfillstyle
        Syntax :   setfillstyle (fill_style ,int color);    
             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 :-



    

          
         


Post a Comment

0 Comments