This transform provides flood fill algorithm (analogue to Paint Bucket tool in the Adobe® Photoshop®).
Namespace:
Aurigma.GraphicsMill.Transforms
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public NotInheritable Class FloodFill _ Inherits MaskedBitmapTransform
public sealed class FloodFill : MaskedBitmapTransform
This transform works in the following way: you specify a start point (with Point property) and it begins filling this point and its neighbour with a color specified with FillColor property until a boundary will be met. Boundary can be defined in different ways: either as pixels of color equal to TargetColor property, or pixels which differ from this color. It is specified with Mode property.
As color values can differ very slightly (due various factors: noise, JPEG compression artifacts, or image features), sometimes algorithm can work not very well. In these situations you can use property Tolerance. This property means the how close current pixel color can be to target color to match. If tolerance is very small only colors very close to target color matches. If big value specified (near 1), almost all colors matches. Thereby if property ProcessHalftones is set to false, algorithm will just replace all matching colors, otherwise it will blend matching colors with the original pixel using distance between these colors as a transparency level (this way you can produce more or less smooth edges on the boundaries).
Member Name | Description |
---|---|
Format8bppGrayScale | 8 bits per pixel. Grayscale. 8 bits are used for luminosity level. |
Format16bppGrayScale | 16 bits per pixel. Grayscale. All 16 bits are used for luminosity level (extended pixel format). |
Format16bppAGrayScale | 16 bits per pixel. Grayscale with alpha channel. 8 bits are used for alpha channel and other 8 bits are used for luminosity level. |
Format32bppAGrayScale | 32 bits per pixel. Grayscale with alpha channel. 16 bits are used for alpha channel and other 16 bits are used for luminosity level (extended pixel format). |
Format24bppRgb | 24 bits per pixel. RGB. 8 bits each are used for the red, green, and blue components. |
Format32bppRgb | 32 bits per pixel. RGB. 8 bits each are used for the red, green, and blue components. The rest 8 bits are unused. |
Format32bppArgb | 32 bits per pixel. RGB with alpha channel. 8 bits each are used for the alpha, red, green, and blue components. |
Format48bppRgb | 48 bits per pixel. RGB. 16 bits each are used for the red, green, and blue components (extended pixel format). |
Format64bppArgb | 64 bits per pixel. RGB with alpha channel. 16 bits each are used for the alpha, red, green, and blue components (extended pixel format). |