C# Class WinRTXamlToolkit.Imaging.WriteableBitmapFloodFillExtensions

WriteableBitmap extensions for filling regions of the bitmap with flood fill and similar algorithms.
Datei anzeigen Open project: xyzzer/WinRTXamlToolkit

Public Methods

Method Description
FloodFill ( this target, int x, int y, int outlineColor, int fillColor ) : void

Fills a region of the bitmap within an outline of outlineColor with a fillColor.

This is the most simple flood fill algorithm implementation. Not the most efficient.

FloodFillReplace ( this target, int x, int y, int oldColor, int fillColor ) : void

Fills a region of the bitmap replacing the oldColor with a fillColor.

This is the most simple flood fill algorithm implementation. Not the most efficient.

FloodFillScanline ( this target, int x, int y, int outlineColor, int fillColor ) : void

Fills a region of the bitmap within an outline of outlineColor with a fillColor.

This is the most simple flood fill algorithm implementation. Not the most efficient.

FloodFillScanlineReplace ( this target, int x, int y, int oldColor, int fillColor ) : void

Fills a region of the bitmap replacing the oldColor with a fillColor.

Improves upon the basic algorithm being about 7x faster.

FloodFillScanlineReplace ( this target, int x, int y, int oldColor, int fillColor, byte maxDiff ) : void

Fills a region of the bitmap replacing the oldColor with a fillColor.

Improves upon the basic algorithm being about 7x faster.

Method Details

FloodFill() public static method

Fills a region of the bitmap within an outline of outlineColor with a fillColor.
This is the most simple flood fill algorithm implementation. Not the most efficient.
public static FloodFill ( this target, int x, int y, int outlineColor, int fillColor ) : void
target this Bitmap to fill.
x int X coordinate of the fill seed point.
y int Y coordinate of the fill seed point.
outlineColor int Color of the outline.
fillColor int New color.
return void

FloodFillReplace() public static method

Fills a region of the bitmap replacing the oldColor with a fillColor.
This is the most simple flood fill algorithm implementation. Not the most efficient.
public static FloodFillReplace ( this target, int x, int y, int oldColor, int fillColor ) : void
target this Bitmap to fill.
x int X coordinate of the fill seed point.
y int Y coordinate of the fill seed point.
oldColor int Old color to replace.
fillColor int New color.
return void

FloodFillScanline() public static method

Fills a region of the bitmap within an outline of outlineColor with a fillColor.
This is the most simple flood fill algorithm implementation. Not the most efficient.
public static FloodFillScanline ( this target, int x, int y, int outlineColor, int fillColor ) : void
target this Bitmap to fill.
x int X coordinate of the fill seed point.
y int Y coordinate of the fill seed point.
outlineColor int Color of the outline.
fillColor int New color.
return void

FloodFillScanlineReplace() public static method

Fills a region of the bitmap replacing the oldColor with a fillColor.
Improves upon the basic algorithm being about 7x faster.
public static FloodFillScanlineReplace ( this target, int x, int y, int oldColor, int fillColor ) : void
target this Bitmap to fill.
x int X coordinate of the fill seed point.
y int Y coordinate of the fill seed point.
oldColor int Old color to replace.
fillColor int New color.
return void

FloodFillScanlineReplace() public static method

Fills a region of the bitmap replacing the oldColor with a fillColor.
Improves upon the basic algorithm being about 7x faster.
public static FloodFillScanlineReplace ( this target, int x, int y, int oldColor, int fillColor, byte maxDiff ) : void
target this Bitmap to fill.
x int X coordinate of the fill seed point.
y int Y coordinate of the fill seed point.
oldColor int Old color to replace.
fillColor int New color.
maxDiff byte Max differenve between old color and other colors that will be filled too.
return void