Search code examples
delphic++builderfiremonkeyvcl

Is there an equivalent to FloodFill in FMX for a TBitmap?


I am converting from VCL to FMX. In VCL, there was a function in a TBitmap's TCanvas called FloodFill, which allowed for a TBitmap's canvas to be flooded with a specific color, until another specific color was reached on the bitmap's canvas.

Is there an equivalent to this function in FMX?


Solution

  • There is not a FloodFill function equivalent in FireMonkey, but you can use a path(TPathData) which can be filled. So you could define a path with the shape to fill, and then use the FMX.Graphics.TCanvas.FillPath to do the interior painting.