---
title: "FloodFill Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_FloodFill.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# FloodFill Class
 
This transform provides flood fill algorithm (analogue to Paint Bucket tool in the Adobe® Photoshop®).
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public NotInheritable Class FloodFill _Inherits MaskedBitmapTransform
```
 
```csharp
public sealed class FloodFill : MaskedBitmapTransform
```
 
## Remarks
  
This transform works in the following way: you specify a start point (with [Point](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_Point.htm.md) property) and it begins filling this point and its neighbour with a color specified with [FillColor](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_FillColor.htm.md) property until a boundary will be met. Boundary can be defined in different ways: either as pixels of color equal to [TargetColor](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_TargetColor.htm.md) property, or pixels which differ from this color. It is specified with [Mode](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_Mode.htm.md) 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](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_Tolerance.htm.md). 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](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_ProcessHalftones.htm.md) 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).
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.SyncHandler](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_SyncHandler.htm.md)
        - [Aurigma.GraphicsMill.UnitConverterHandler](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_UnitConverterHandler.htm.md)
            - [Aurigma.GraphicsMill.Transforms.BitmapTransform](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_BitmapTransform.htm.md)
                - [Aurigma.GraphicsMill.Transforms.MaskedBitmapTransform](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_MaskedBitmapTransform.htm.md)
                    - Aurigma.GraphicsMill.Transforms.FloodFill
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
  
## Supported Pixel Formats

| 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). |
 
## See Also

### Reference

- [FloodFill Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Transforms_FloodFill.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
