Click or drag to resize

Math2DFloodFill_4Neighbour(Int32, Int32, FuncInt32, Int32, Boolean, ActionInt32, Int32, FuncInt32, Int32, Boolean) Method

A very general flood fill algorithm (4-Neighbour algorithm). It tests iteratively the 4 neighbouring pixels.

Namespace: Altaxo.Geometry
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public static void FloodFill_4Neighbour(
	int xStart,
	int yStart,
	Func<int, int, bool> IsPixelToBeFilled,
	Action<int, int> SetPixelToNewValue,
	Func<int, int, bool> IsPixelCoordinateValid
)

Parameters

xStart  Int32
The start pixel's x coordinate.
yStart  Int32
The start pixel's y coordinate.
IsPixelToBeFilled  FuncInt32, Int32, Boolean
Function that evaluates if the pixel fulfills a condition so that it should be set to a new value.
SetPixelToNewValue  ActionInt32, Int32
Action to set the pixel to a new value.
IsPixelCoordinateValid  FuncInt32, Int32, Boolean
Tests the pixel coordinate to find out if it is in a valid range.
See Also