drawFloodFill(x1: Real; y1: Real; type: Integer; color: Integer);
The drawFloodFill method of the Window class fills an area of the screen surface by using the brush defined by the drawFillStyle and drawFillColor properties of the object. If this method is not called from a paint event, set the autoRedraw property to true.
The type of flood fill specified determines which part of the screen is filled.
Only devices (which does not include printers) that support raster-display operations support the flood-fill operation. To print a shape that is flood-filled, use the Control class createPicture method to capture an image and then print the bitmap that is created.
The drawFloodFill method parameters are listed in the following table.
Parameter | Description |
---|---|
x1, y1 | Starting points of the flood fill. |
type | Type of flood fill. A value of zero (0) specifies that flood fill occurs until a border of "color" is reached. A value of 1 specifies that flood fill continues outward in all directions as long as the "color" is encountered, which is useful for filling areas that have multicolored boundaries. |
color | Color of the pen used. |