The base class that the flood fill algorithms inherit from. Implements the basic flood filler functionality that is the same across all algorithms.
More...
The base class that the flood fill algorithms inherit from. Implements the basic flood filler functionality that is the same across all algorithms.
Definition at line 13 of file AbstractFloodFiller.cs.
◆ AbstractFloodFiller() [1/2]
| Bio.Graphics.AbstractFloodFiller.AbstractFloodFiller |
( |
| ) |
|
◆ AbstractFloodFiller() [2/2]
Definition at line 47 of file AbstractFloodFiller.cs.
48 {
49 if (configSource != null)
50 {
51 this.Bitmap = configSource.Bitmap;
52 this.FillColor = configSource.FillColor;
53 this.FillDiagonally = configSource.FillDiagonally;;
54 this.Tolerance = configSource.Tolerance;
55 }
56 }
◆ FloodFill()
| void Bio.Graphics.AbstractFloodFiller.FloodFill |
( |
Point | pt | ) |
|
|
abstract |
It fills the area of the image that is connected to the point pt with the current color
- Parameters
-
| pt | The starting point for the fill. |
◆ PrepareForFloodFill()
| void Bio.Graphics.AbstractFloodFiller.PrepareForFloodFill |
( |
Point | pt | ) |
|
|
protected |
It takes a point on the bitmap and gets the color of that point. It then creates a new color that is the fill color. It then gets the stride, pixel format size, pixel format, and the bitmap bits. It then creates a new boolean array that is the size of the bitmap bits divided by the pixel format size
- Parameters
-
| pt | The point to start the flood fill from. |
Definition at line 95 of file AbstractFloodFiller.cs.
96 {
97 startColor = bitmap.GetPixel((int)pt.X, (int)pt.Y);
98 byteFillColor = new ColorS(fillColor.B, fillColor.G, fillColor.R);
99 bitmapStride=bitmap.Stride;
100 bitmapPixelFormatSize=bitmap.PixelFormatSize;
101 pixelFormat = bitmap.PixelFormat;
102 bitmapBits = bitmap.Bytes;
103 bitmapWidth = bitmap.SizeX;
104 bitmapHeight = bitmap.SizeY;
105 pixelsChecked = new bool[bitmapBits.Length / bitmapPixelFormatSize];
106 }
◆ bitmap
| Bitmap Bio.Graphics.AbstractFloodFiller.bitmap |
|
protected |
◆ bitmapBits
| byte [] Bio.Graphics.AbstractFloodFiller.bitmapBits = null |
|
protected |
◆ bitmapHeight
| int Bio.Graphics.AbstractFloodFiller.bitmapHeight = 0 |
|
protected |
◆ bitmapPixelFormatSize
| int Bio.Graphics.AbstractFloodFiller.bitmapPixelFormatSize = 0 |
|
protected |
◆ bitmapStride
| int Bio.Graphics.AbstractFloodFiller.bitmapStride = 0 |
|
protected |
◆ bitmapWidth
| int Bio.Graphics.AbstractFloodFiller.bitmapWidth = 0 |
|
protected |
◆ byteFillColor
| ColorS Bio.Graphics.AbstractFloodFiller.byteFillColor |
|
protected |
◆ fillColor
| ColorS Bio.Graphics.AbstractFloodFiller.fillColor = ColorS.FromColor(Color.Black) |
|
protected |
◆ fillDiagonally
| bool Bio.Graphics.AbstractFloodFiller.fillDiagonally = false |
|
protected |
◆ pixelFormat
| PixelFormat Bio.Graphics.AbstractFloodFiller.pixelFormat |
|
protected |
◆ pixelsChecked
| bool [] Bio.Graphics.AbstractFloodFiller.pixelsChecked |
|
protected |
◆ slow
| bool Bio.Graphics.AbstractFloodFiller.slow = false |
|
protected |
◆ startColor
| ColorS Bio.Graphics.AbstractFloodFiller.startColor |
|
protected |
◆ tolerance
| ColorS Bio.Graphics.AbstractFloodFiller.tolerance = new ColorS(25, 25, 25) |
|
protected |
◆ Bitmap
| Bitmap Bio.Graphics.AbstractFloodFiller.Bitmap |
|
getset |
Definition at line 76 of file AbstractFloodFiller.cs.
77 {
78 get { return bitmap; }
79 set
80 {
81 bitmap = value;
82 }
83 }
◆ FillColor
| ColorS Bio.Graphics.AbstractFloodFiller.FillColor |
|
getset |
Definition at line 58 of file AbstractFloodFiller.cs.
59 {
60 get { return fillColor; }
61 set { fillColor = value; }
62 }
◆ FillDiagonally
| bool Bio.Graphics.AbstractFloodFiller.FillDiagonally |
|
getset |
Definition at line 64 of file AbstractFloodFiller.cs.
65 {
66 get { return fillDiagonally; }
67 set { fillDiagonally = value; }
68 }
◆ Tolerance
| ColorS Bio.Graphics.AbstractFloodFiller.Tolerance |
|
getset |
Definition at line 70 of file AbstractFloodFiller.cs.
71 {
72 get { return tolerance; }
73 set { tolerance = value; }
74 }
The documentation for this class was generated from the following file: