33 int x = (int)pt.X;
int y = (int)pt.Y;
40 LinearFill(ref x, ref y);
43 while (ranges.
Count > 0)
51 int upY = range.Y - 1;
52 int downY = range.Y + 1;
54 for (
int i = range.
StartX; i <= range.
EndX; i++)
60 LinearFill(ref i, ref upY);
66 LinearFill(ref i, ref downY);
84 void LinearFill(ref
int x, ref
int y)
94 byte[] bt =
new byte[6];
201 FloodFillRange r =
new FloodFillRange(lFillLoc, rFillLoc, y);
238 ushort r = BitConverter.ToUInt16(
bitmapBits, px);
244 ushort r = BitConverter.ToUInt16(
bitmapBits, px);
245 ushort g = BitConverter.ToUInt16(
bitmapBits, px + 2);
246 ushort b = BitConverter.ToUInt16(
bitmapBits, px + 4);
251 throw new NotSupportedException(
bitmap.PixelFormat +
" not supported");
AForge.PixelFormat PixelFormat
The base class that the flood fill algorithms inherit from. Implements the basic flood filler functio...
void PrepareForFloodFill(Point pt)
int bitmapPixelFormatSize
A queue of FloodFillRanges.
FloodFillRange Dequeue()
Removes and returns the FloodFillRange at the beginning of the queue.
void Enqueue(ref FloodFillRange r)
Adds a FloodFillRange to the end of the queue.
int Count
Returns the number of items currently in the queue.
Implements the QueueLinear flood fill algorithm using array-based pixel manipulation.
bool CheckPixel(ref int px)
QueueLinearFloodFiller(AbstractFloodFiller configSource)
override void FloodFill(AForge.Point pt)
Fills the specified point on the bitmap with the currently selected fill color.
int CoordsToByteIndex(ref int x, ref int y)
int CoordsToPixelIndex(int x, int y)
Returns the linear index for a pixel, given its x and y coordinates.
Represents a linear range to be filled and branched from.
FloodFillRange(int startX, int endX, int y)