C# Class SimplePaletteQuantizer.Quantizers.MedianCut.MedianCutCube

Afficher le fichier Open project: RHY3756547/FreeSO Class Usage Examples

Méthodes publiques

Méthode Description
IsColorIn ( Color color ) : System.Boolean

Determines whether the color is in the space of this cube.

MedianCutCube ( ICollection colors ) : System

Initializes a new instance of the MedianCutCube class.

SetPaletteIndex ( Int32 newPaletteIndex ) : void

Assigns a palette index to this cube, to be later found by a GetPaletteIndex method.

SplitAtMedian ( Byte componentIndex, MedianCutCube &firstMedianCutCube, MedianCutCube &secondMedianCutCube ) : void

Splits this cube's color list at median index, and returns two newly created cubes.

Private Methods

Méthode Description
Shrink ( ) : void

Shrinks this cube to the least dimensions that covers all the colors in the RGB space.

Method Details

IsColorIn() public méthode

Determines whether the color is in the space of this cube.
public IsColorIn ( Color color ) : System.Boolean
color Color The color to be checked, if it's contained in this cube.
Résultat System.Boolean

MedianCutCube() public méthode

Initializes a new instance of the MedianCutCube class.
public MedianCutCube ( ICollection colors ) : System
colors ICollection The colors.
Résultat System

SetPaletteIndex() public méthode

Assigns a palette index to this cube, to be later found by a GetPaletteIndex method.
public SetPaletteIndex ( Int32 newPaletteIndex ) : void
newPaletteIndex System.Int32 The palette index to be assigned to this cube.
Résultat void

SplitAtMedian() public méthode

Splits this cube's color list at median index, and returns two newly created cubes.
public SplitAtMedian ( Byte componentIndex, MedianCutCube &firstMedianCutCube, MedianCutCube &secondMedianCutCube ) : void
componentIndex Byte Index of the component (red = 0, green = 1, blue = 2).
firstMedianCutCube MedianCutCube The first created cube.
secondMedianCutCube MedianCutCube The second created cube.
Résultat void