C# Класс SimplePaletteQuantizer.Quantizers.MedianCut.MedianCutCube

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
Shrink ( ) : void

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

Описание методов

IsColorIn() публичный Метод

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.
Результат System.Boolean

MedianCutCube() публичный Метод

Initializes a new instance of the MedianCutCube class.
public MedianCutCube ( ICollection colors ) : System
colors ICollection The colors.
Результат System

SetPaletteIndex() публичный Метод

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.
Результат void

SplitAtMedian() публичный Метод

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.
Результат void