How can I fill color into a rectangle in a C language so that the rectange be of blue color lets say. by filling it by the function setfillstyle(SOLID_FILL,1); I am not gettin it right. The program was..... #include<stdio.h> #include<graphics.h> #include<conio.h> void main() { int gd=DETECT, gm; initgraph(&gd,&gm,"c:\\tc\\bin"); setcolor(1); //sets a blue color to the outline setfillstyle(1,14); //This does'nt work rectangle(200,100,300,350); getch(); }
|
| Author: Preet 07 Oct 2008 | Member Level: Gold | Rating:   Points: 3 |
Use the floodfill function to fill an area, pass two arguments (x,y) which would be any point in the rectangle boundries. And this function will fill the area untill get some boundries.
|