floodfill
This function is used to fill the area.
void floodfill(
int x,
int y,
COLORREF color,
int filltype = FLOODFILLBORDER
);
Parameters
x
The x coordinates of any point in the area to be filled.
y
The y coordinates of any point in the area to be filled.
color
The color of the boundary or area to be filled. The exact explanation depends on the value of the parameter filltype.
filltype
The type of fill operation to perform. This can be the following macro or value:
Macro | Value | Description |
---|---|---|
FLOODFILLBORDER | 0 | The fill action is filled in a closed area surrounded by the color parameter color. |
FLOODFILLSURFACE | 1 | The fill action is filled with a continuous color surface specified by the color parameter color. |
Return Value
None
Remarks
For the FLOODFILLBORDER fill type, the fill action starts with (x,y) and spreads around until the color specified by the border is encountered. The specified area must be closed. Suitable for filling area with fixed color boundaries.
For the FLOODFILLSURFACE fill type, the fill action starts with (x,y) and extends as long as the adjacent color is color. Suitable for filling areas with multiple color boundaries.
The fill color is set by the function setfillcolor, and the fill style is set by the function setfillstyle.
Examples
None