C# Class SimplePaletteQuantizer.Quantizers.BaseColorQuantizer

Inheritance: IColorQuantizer
Afficher le fichier Open project: RHY3756547/FreeSO

Protected Properties

Свойство Type Description
UniqueColors Int16>.ConcurrentDictionary

Méthodes publiques

Méthode Description
AddColor ( Color color, Int32 x, Int32 y ) : void

See IColorQuantizer.AddColor for more details.

ChangePathProvider ( IPathProvider pathProvider ) : void

Changes the path provider.

Finish ( ) : void

See IColorQuantizer.Finish for more details.

GetColorCount ( ) : Int32

See IColorQuantizer.GetColorCount for more details.

GetPalette ( Int32 colorCount ) : List

See IColorQuantizer.GetPalette for more details.

GetPaletteIndex ( Color color, Int32 x, Int32 y ) : Int32

See IColorQuantizer.GetPaletteIndex for more details.

GetPointPath ( Int32 width, Int32 heigth ) : IList

See IPathProvider.GetPointPath for more details.

Prepare ( ImageBuffer image ) : void

See IColorQuantizer.Prepare for more details.

Méthodes protégées

Méthode Description
BaseColorQuantizer ( ) : System

Initializes a new instance of the BaseColorQuantizer class.

OnAddColor ( Color color, Int32 key, Int32 x, Int32 y ) : void

Called when color is to be added.

OnCreateDefaultPathProvider ( ) : IPathProvider

Called when a need to create default path provider arisen.

OnFinish ( ) : void

Called when about to clear left-overs after quantization.

OnGetColorCount ( ) : Int32

Called when get color count.

OnGetPalette ( Int32 colorCount ) : List

Called when quantized palette is needed.

OnGetPaletteIndex ( Color color, Int32 key, Int32 x, Int32 y, Int32 &paletteIndex ) : void

Called when get palette index for a given color should be returned.

OnPrepare ( ImageBuffer image ) : void

Called when quantizer is about to be prepared for next round.

Private Methods

Méthode Description
GetPathProvider ( ) : IPathProvider

Method Details

AddColor() public méthode

See IColorQuantizer.AddColor for more details.
public AddColor ( Color color, Int32 x, Int32 y ) : void
color Color
x System.Int32
y System.Int32
Résultat void

BaseColorQuantizer() protected méthode

Initializes a new instance of the BaseColorQuantizer class.
protected BaseColorQuantizer ( ) : System
Résultat System

ChangePathProvider() public méthode

Changes the path provider.
public ChangePathProvider ( IPathProvider pathProvider ) : void
pathProvider IPathProvider The path provider.
Résultat void

Finish() public méthode

See IColorQuantizer.Finish for more details.
public Finish ( ) : void
Résultat void

GetColorCount() public méthode

See IColorQuantizer.GetColorCount for more details.
public GetColorCount ( ) : Int32
Résultat System.Int32

GetPalette() public méthode

See IColorQuantizer.GetPalette for more details.
public GetPalette ( Int32 colorCount ) : List
colorCount System.Int32
Résultat List

GetPaletteIndex() public méthode

See IColorQuantizer.GetPaletteIndex for more details.
public GetPaletteIndex ( Color color, Int32 x, Int32 y ) : Int32
color Color
x System.Int32
y System.Int32
Résultat System.Int32

GetPointPath() public méthode

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

OnAddColor() protected méthode

Called when color is to be added.
protected OnAddColor ( Color color, Int32 key, Int32 x, Int32 y ) : void
color Color
key System.Int32
x System.Int32
y System.Int32
Résultat void

OnCreateDefaultPathProvider() protected méthode

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

OnFinish() protected méthode

Called when about to clear left-overs after quantization.
protected OnFinish ( ) : void
Résultat void

OnGetColorCount() protected méthode

Called when get color count.
protected OnGetColorCount ( ) : Int32
Résultat System.Int32

OnGetPalette() protected méthode

Called when quantized palette is needed.
protected OnGetPalette ( Int32 colorCount ) : List
colorCount System.Int32
Résultat List

OnGetPaletteIndex() protected méthode

Called when get palette index for a given color should be returned.
protected OnGetPaletteIndex ( Color color, Int32 key, Int32 x, Int32 y, Int32 &paletteIndex ) : void
color Color
key System.Int32
x System.Int32
y System.Int32
paletteIndex System.Int32
Résultat void

OnPrepare() protected méthode

Called when quantizer is about to be prepared for next round.
protected OnPrepare ( ImageBuffer image ) : void
image SimplePaletteQuantizer.Helpers.ImageBuffer
Résultat void

Prepare() public méthode

See IColorQuantizer.Prepare for more details.
public Prepare ( ImageBuffer image ) : void
image SimplePaletteQuantizer.Helpers.ImageBuffer
Résultat void

Property Details

UniqueColors protected_oe property

protected ConcurrentDictionary UniqueColors
Résultat Int16>.ConcurrentDictionary