BOOL ExtFloodFill(hdc, nXStart, nYStart, clrref, fuFillType) | |||||
HDC hdc; | /* handle of device context | */ | |||
int nXStart; | /* x-coordinate where filling begins | */ | |||
int nYStart; | /* y-coordinate where filling begins | */ | |||
COLORREF clrref; | /* color of fill, */ | ||||
UINT fuFillType; | /* fill type, */ |
The ExtFloodFill function fills an area of the screen surface by using the current brush. The type of flood fill specified determines which part of the screen is filled.
hdc
Identifies the device context.
nXStart
Specifies the logical x-coordinate at which to begin filling.
nYStart
Specifies the logical y-coordinate at which to begin filling.
clrref
Specifies the color of the boundary or area to be filled. The interpretation of this parameter depends on the value of the fuFillType parameter.
fuFillType
Specifies the type of flood fill to be performed. It must be one of the following values:
Value | Meaning |
FLOODFILLBORDER | Fill area is bounded by the color specified by the clrref parameter. This style is identical to the filling performed by the FloodFill function. |
FLOODFILLSURFACE | Fill area is defined by the color specified by the clrref parameter. Filling continues outward in all directions as long as the color is encountered. This style is useful for filling areas that have multicolored boundaries. |
The return value is nonzero if the function is successful. It is zero if the filling cannot be completed, if the given point has the boundary color specified by the clrref parameter (if FLOODFILLBORDER was requested), if the given point does not have the color specified by clrref (if FLOODFILLSURFACE was requested), or if the point is outside the clipping region.
Only memory device contexts and devices that support raster-display technology support the ExtFloodFill function. For more information about raster capabilities, see the description of the GetDeviceCaps function.
If the fuFillType parameter is the FLOODFILLBORDER value, the area is assumed to be completely bounded by the color specified by the clrref parameter. The ExtFloodFill function begins at the coordinates specified by the nXStart and nYStart parameters and fills in all directions to the color boundary.
If fuFillType is FLOODFILLSURFACE, ExtFloodFill begins at the coordinates specified by nXStart and nYStart and continues in all directions, filling all adjacent areas containing the color specified by clrref.