C# Class SimplePaletteQuantizer.Quantizers.Octree.OctreeNode

Datei anzeigen Open project: RHY3756547/FreeSO Class Usage Examples

Public Methods

Method Description
AddColor ( Color color, Int32 level, OctreeQuantizer parent ) : void

Adds the color.

GetPaletteIndex ( Color color, Int32 level ) : Int32

Gets the index of the palette.

OctreeNode ( Int32 level, OctreeQuantizer parent ) : System

Initializes a new instance of the OctreeNode class.

RemoveLeaves ( Int32 level, Int32 activeColorCount, Int32 targetColorCount, OctreeQuantizer parent ) : Int32

Removes the leaves by summing all it's color components and pixel presence.

Private Methods

Method Description
GetColorIndexAtLevel ( Color color, Int32 level ) : Int32

Calculates the color component bit (level) index.

SetPaletteIndex ( Int32 index ) : void

Sets a palette index to this node.

Method Details

AddColor() public method

Adds the color.
public AddColor ( Color color, Int32 level, OctreeQuantizer parent ) : void
color Color The color.
level System.Int32 The level.
parent OctreeQuantizer The parent.
return void

GetPaletteIndex() public method

Gets the index of the palette.
public GetPaletteIndex ( Color color, Int32 level ) : Int32
color Color The color.
level System.Int32 The level.
return System.Int32

OctreeNode() public method

Initializes a new instance of the OctreeNode class.
public OctreeNode ( Int32 level, OctreeQuantizer parent ) : System
level System.Int32
parent OctreeQuantizer
return System

RemoveLeaves() public method

Removes the leaves by summing all it's color components and pixel presence.
public RemoveLeaves ( Int32 level, Int32 activeColorCount, Int32 targetColorCount, OctreeQuantizer parent ) : Int32
level System.Int32
activeColorCount System.Int32
targetColorCount System.Int32
parent OctreeQuantizer
return System.Int32