[fpc-pascal] fpcanvas and FloodFill()

Michael Van Canneyt michael at freepascal.org
Mon Jul 2 13:22:01 CEST 2007



On Mon, 2 Jul 2007, Graeme Geldenhuys wrote:

> Hi,
> 
> Still trying to implement fpcanvas as the bases classed for fpGUI.
> What is the function of...?
> 
> TFPCustomCanvas = class
> ....
>  procedure FloodFill (x,y:integer);
> ...
> 
> How is it supposed to differ from Canvas.Clear() and
> Canvas.Rectangle() which can both handle filling of a rectangle?

It fills the canvas (in all directions) till it encounters a different 
color which differs from the starting color. You can use this to fill
irregular shapes.


Michael.



More information about the fpc-pascal mailing list