---
title: "FloodFill Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_FloodFill.htm
product: "Graphics Mill"
---

# FloodFill Class
 
Applies a flood fill transformation (analogue to Paint Bucket tool in the Adobe® Photoshop®) to an image.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class FloodFill : MaskTransform
```
 
## Remarks
  
This transform works in the following way: you specify a start point (with [Point](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_FloodFill_Point.htm.md) property) and it begins filling this point and its neighbour with a color specified with the [FillColor](https://www.graphicsmill.com/docs/gm/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/gm/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/gm/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/gm/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/gm/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
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Transforms.Transform](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Transform.htm.md)
            - [Aurigma.GraphicsMill.Transforms.MaskTransform](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_MaskTransform.htm.md)
                - Aurigma.GraphicsMill.Transforms.FloodFill
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [FloodFill Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Transforms_FloodFill.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
