C# 클래스 AForge.Imaging.Filters.PointedColorFloodFill

Flood filling with specified color starting from specified point.

The filter performs image's area filling (4 directional) starting from the specified point. It fills the area of the pointed color, but also fills other colors, which are similar to the pointed within specified tolerance. The area is filled using specified fill color.

The filter accepts 8 bpp grayscale images and 24 bpp color images for processing.

Sample usage:

// create filter PointedColorFloodFill filter = new PointedColorFloodFill( ); // configure the filter filter.Tolerance = Color.FromArgb( 150, 92, 92 ); filter.FillColor = Color.FromArgb( 255, 255, 255 ); filter.StartingPoint = new IntPoint( 150, 100 ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

상속: BaseInPlacePartialFilter
파일 보기 프로젝트 열기: noxryan/Claro-Shader 1 사용 예제들

공개 메소드들

메소드 설명
PointedColorFloodFill ( ) : System

Initializes a new instance of the PointedColorFloodFill class.

PointedColorFloodFill ( Color fillColor ) : System

Initializes a new instance of the PointedColorFloodFill class.

보호된 메소드들

메소드 설명
ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void

Process the filter on the specified image.

비공개 메소드들

메소드 설명
CheckGrayPixel ( byte pixel ) : bool
CheckRGBPixel ( byte pixel ) : bool
CoordsToPointerGray ( int x, int y ) : int
CoordsToPointerRGB ( int x, int y ) : int
LinearFloodFill4Gray ( IntPoint startingPoint ) : void
LinearFloodFill4RGB ( IntPoint startPoint ) : void

메소드 상세

PointedColorFloodFill() 공개 메소드

Initializes a new instance of the PointedColorFloodFill class.
public PointedColorFloodFill ( ) : System
리턴 System

PointedColorFloodFill() 공개 메소드

Initializes a new instance of the PointedColorFloodFill class.
public PointedColorFloodFill ( Color fillColor ) : System
fillColor Color Fill color.
리턴 System

ProcessFilter() 보호된 메소드

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void
image UnmanagedImage Source image data.
rect System.Drawing.Rectangle Image rectangle for processing by the filter.
리턴 void