[Overview][Constants][Types][Procedures and functions][Index] | Reference for unit 'GraphUtil' (#lcl)

# FloodFill

A simple first-in-first-out circular buffer (queue) for flood-filling contiguous voxels.

## Declaration

Source position: graphutil.pp line 75

`procedure FloodFill(`
`Canvas: TCanvas;`
`X: Integer;`
`Y: Integer;`
`lColor: TColor;`
`FillStyle: TFillStyle`
`);`

## Description

FloodFill is a procedure which implements a simple first-in-first-out circular buffer (queue) for flood-filling contiguous voxels. This algorithm avoids stack problems associated simple recursive algorithms described in the discussion at http://steve.hollasch.net/cgindex/polygons/floodfill.html. Please note that the routine is slow because of its use of Canvas.Pixels.

Original author: Chris Rorden