RGBSurface.FloodFill
From Xojo Documentation
Method
RGBSurface.FloodFill(x as Double, y as Double, FillColor as Color)
New in 5.5
Supported for all project types and targets.
New in 5.5
Supported for all project types and targets.
Performs a "floodfill" (the action performed by a PaintBucket tool in an image editing program) on an RGBSurface.
Notes
The pixel at x, y and all adjacent pixels of the same color are changed to the passed FillColor.
Sample Code
The following code uses the FloodFill method to paint an RGBSurface object in a random color. It is in the MouseDown event of a Canvas control. The variable p is a Picture object.