setfillstyle() function

setfillstyle function sets the current fill pattern and fill color.

Declaration of setfillstyle() function

void setfillstyle( int pattern, int color); 

Different fill styles:

enum fill_styles

{

  EMPTY_FILL, 

  SOLID_FILL, 

  LINE_FILL, 

  LTSLASH_FILL,

  SLASH_FILL, 

  BKSLASH_FILL,

  LTBKSLASH_FILL,

   HATCH_FILL, 

  XHATCH_FILL,

  INTERLEAVE_FILL,

  WIDE_DOT_FILL, 

  CLOSE_DOT_FILL,

  USER_FILL

};

C programming sourcecode for setfillstyle()

#include<graphics.h> 
#include<conio.h>
main()
{
	int gd = DETECT, gm;
	initgraph(&gd, &gm, "C:\\ TurboC3\\BGI"); 
	setfillstyle(XHATCH_FILL, RED);
	circle(100, 100, 50);
	floodfill(100, 100, WHITE);
	getch(); 
	closegraph(); 
	return 0;
}