|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home MathPack OpenArrays Procedures and Functions FloodFillArray|
|See also: FillArray|
The function FloodFillArray fills all connected cells of the Data array with the value specified by Target. Cells are considered to be connected if they have a common edge and their values either are equal to Data[px,py] (version ) or are within the range defined by Data[px,py]+/-Tolerance (version ). The starting point of the flood fill algorithm is controlled by px and py (zero-based coordinates). On return, the variable parameters ATop, ABot, ALeft and ARight specify the circumscribing rectangle of the filled area.
The function returns the following error codes:
>0 ... everything is OK, the returned number is the number of cells belonging to the filled region