BOOL FloodFill(hdc, nXStart, nYStart, clrref) | |||||
HDC hdc; | /* handle of device context | */ | |||
int nXStart; | /* x-coordinate of starting position | */ | |||
int nYStart; | /* y-coordinate of starting position | */ | |||
COLORREF clrref; | /* color of fill boundary | */ |
The FloodFill function fills an area of the screen surface by using the current brush. The area is assumed to be bounded as specified by the clrref parameter. The FloodFill function begins at the point specified by the nXStart and nYStart parameters and continues in all directions to the color boundary.
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.
The return value is nonzero if the function is successful. Otherwise, it is zero, indicating that the filling cannot be completed, that the given point has the boundary color specified by clrref, or that the point is outside the clipping region.
Only memory device contexts and devices that support raster-display technology support the FloodFill function. For more information about raster capabilities, see the description of the GetDeviceCaps function.