Unit 'GraphUtil' Package
[Overview][Constants][Types][Procedures and functions][Index] [#lcl]

FloodFill

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

Declaration

Source position: graphutil.pp line 72

procedure FloodFill(

  Canvas: TCanvas;

  X: Integer;

  Y: Integer;

  lColor: TGraphicsColor;

  FillStyle: TGraphicsFillStyle

);

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.

Orginal author: Chris Rorden