C# Class SimplePaletteQuantizer.Ditherers.BaseColorDitherer

Inheritance: IColorDitherer
显示文件 Open project: RHY3756547/FreeSO

Public Methods

Method Description
ChangePathProvider ( IPathProvider pathProvider ) : void
Finish ( ) : void

See IColorDitherer.Prepare for more details.

GetPointPath ( ) : IList

Retrieves the path in which to traverse

GetPointPath ( Int32 width, Int32 heigth ) : IList

See IPathProvider.GetPointPath for more details.

Prepare ( IColorQuantizer quantizer, Int32 colorCount, ImageBuffer sourceBuffer, ImageBuffer targetBuffer ) : void

See IColorDitherer.Prepare for more details.

ProcessPixel ( Pixel sourcePixel, Pixel targetPixel ) : System.Boolean

See ProcessPixel for more details.

Protected Methods

Method Description
CreateCoeficientMatrix ( ) : ].Byte[

Creates the coeficient matrix.

GetClampedColorElement ( Int32 colorElement ) : Int32
GetClampedColorElementWithError ( Int32 colorElement, System.Single factor, Int32 error ) : Int32
OnCreateDefaultPathProvider ( ) : IPathProvider

Called when a need to create default path provider arisen.

OnFinish ( ) : void

Called when dithering is finished.

OnPrepare ( ) : void

Called when ditherer is about to be prepared.

OnProcessPixel ( Pixel sourcePixel, Pixel targetPixel ) : System.Boolean

Allows ditherer to process image per pixel, with ability to access the rest of the image.

Private Methods

Method Description
GetMatrixFactor ( ) : Int32
GetPathProvider ( ) : IPathProvider

Method Details

ChangePathProvider() public method

public ChangePathProvider ( IPathProvider pathProvider ) : void
pathProvider IPathProvider
return void

CreateCoeficientMatrix() protected abstract method

Creates the coeficient matrix.
protected abstract CreateCoeficientMatrix ( ) : ].Byte[
return ].Byte[

Finish() public method

See IColorDitherer.Prepare for more details.
public Finish ( ) : void
return void

GetClampedColorElement() protected method

protected GetClampedColorElement ( Int32 colorElement ) : Int32
colorElement System.Int32
return System.Int32

GetClampedColorElementWithError() protected method

protected GetClampedColorElementWithError ( Int32 colorElement, System.Single factor, Int32 error ) : Int32
colorElement System.Int32
factor System.Single
error System.Int32
return System.Int32

GetPointPath() public method

Retrieves the path in which to traverse
public GetPointPath ( ) : IList
return IList

GetPointPath() public method

See IPathProvider.GetPointPath for more details.
public GetPointPath ( Int32 width, Int32 heigth ) : IList
width System.Int32
heigth System.Int32
return IList

OnCreateDefaultPathProvider() protected method

Called when a need to create default path provider arisen.
protected OnCreateDefaultPathProvider ( ) : IPathProvider
return IPathProvider

OnFinish() protected method

Called when dithering is finished.
protected OnFinish ( ) : void
return void

OnPrepare() protected method

Called when ditherer is about to be prepared.
protected OnPrepare ( ) : void
return void

OnProcessPixel() protected abstract method

Allows ditherer to process image per pixel, with ability to access the rest of the image.
protected abstract OnProcessPixel ( Pixel sourcePixel, Pixel targetPixel ) : System.Boolean
sourcePixel Pixel
targetPixel Pixel
return System.Boolean

Prepare() public method

See IColorDitherer.Prepare for more details.
public Prepare ( IColorQuantizer quantizer, Int32 colorCount, ImageBuffer sourceBuffer, ImageBuffer targetBuffer ) : void
quantizer IColorQuantizer
colorCount System.Int32
sourceBuffer SimplePaletteQuantizer.Helpers.ImageBuffer
targetBuffer SimplePaletteQuantizer.Helpers.ImageBuffer
return void

ProcessPixel() public method

See ProcessPixel for more details.
public ProcessPixel ( Pixel sourcePixel, Pixel targetPixel ) : System.Boolean
sourcePixel Pixel
targetPixel Pixel
return System.Boolean