---
title: "FloodFill Constructor (Point, Color, Color, FloodFillMode, Single, Boolean, Boolean)"
canonical: https://www.graphicsmill.com/docs/gm5/C_Aurigma_GraphicsMill_Transforms_FloodFill_ctor_7_00b0b6b9.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 Constructor (Point, Color, Color, FloodFillMode, Single, Boolean, Boolean)
 
Creates and initializes new [FloodFill](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_FloodFill.htm.md) class instance. You can set all flood fill parameters here.
 
**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 Sub New ( _point As Point, _fillColor As Color, _targetColor As Color, _mode As FloodFillMode, _tolerance As Single, _preserveAlpha As Boolean, _processHalftones As Boolean _
)
```
 
```csharp
public FloodFill(Point point,Color fillColor,Color targetColor,FloodFillMode mode,float tolerance,bool preserveAlpha,bool processHalftones
)
```
 
### Parameters
 
 - point
     - Type: [System.Drawing.Point](http://msdn2.microsoft.com/en-us/bk9hwzbw)
 [Point](http://msdn2.microsoft.com/en-us/bk9hwzbw) structure that specifies a point to start filling from. You can change it later using [Point](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_Point.htm.md) property.

 - fillColor
     - Type: [Aurigma.GraphicsMill.Color](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Color.htm.md)
 [Color](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Color.htm.md) value that specifies a color to fill with. You can change it later using [FillColor](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_FillColor.htm.md) property.

 - targetColor
     - Type: [Aurigma.GraphicsMill.Color](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Color.htm.md)
The [Color](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Color.htm.md) which is used to determine the filling area boundaries. The method behaviour depends on *mode* argument value. If *mode* is [UntilColor](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_FloodFillMode.htm.md), this is a boundary color (when algorithm meets this color, it stops filling). If *mode* is [TillColor](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_FloodFillMode.htm.md), this is a surface color (algorithm continue filling till current color is the same as target color). You can change it later using [TargetColor](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_TargetColor.htm.md) property.

 - mode
     - Type: [Aurigma.GraphicsMill.Transforms.FloodFillMode](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_FloodFillMode.htm.md)
 [FloodFillMode](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_FloodFillMode.htm.md) value specifying how to determine the filling area boundary (see comments for *targetColor*). You can change it later using [Mode](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_Mode.htm.md) property.

 - tolerance
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Value in range [0, 1] specifying admissible tolerance (distance between colors in color space) when comparing current color and target color (see comments for *targetColor*). Minimum value (0) means exact match of the colors, maximum value (1) means that any color matches. You can change it later using [Tolerance](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_Tolerance.htm.md) property.

 - preserveAlpha
     - Type: [System.Boolean](http://msdn2.microsoft.com/en-us/a28wyd50)
Value specifying if to preserve alpha channel. If **true**, alpha channel will not be overwritten by filling color. You can change it later using [PreserveAlpha](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_PreserveAlpha.htm.md) property.

 - processHalftones
     - Type: [System.Boolean](http://msdn2.microsoft.com/en-us/a28wyd50)
Value specifying how to handle situations when current color does not exactly match target color, but tolerant to it (with specified *tolerance*). If **false**, this pixel is replaced with brush color, if **true**, it is alpha-blended (alpha is calculated as 1 - T, where T is actual tolerance between these colors). You can change it later using [ProcessHalftones](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_FloodFill_ProcessHalftones.htm.md) property.
   
## See Also

### Reference

- [FloodFill Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_FloodFill.htm.md)
- [FloodFill Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Transforms_FloodFill_ctor.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
