|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.imaging.ColorPalette
public final class ColorPalette
Defines an array of colors that make up a color palette. The colors are 32-bit ARGB colors. Not inheritable.
Constructor Summary | |
---|---|
ColorPalette(Color[] entries)
Initializes a new instance of the ColorPalette class. |
Method Summary | |
---|---|
Color |
getColor(int index)
Gets the palette color by index. |
Color[] |
getEntries()
Gets an array of Color structures. |
int |
getEntriesCount()
Gets the entries count. |
int |
getNearestColorIndex(Color color)
Gets the index of the nearest color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorPalette(Color[] entries)
Initializes a new instance of the ColorPalette
class.
entries
- The color palette entries.Method Detail |
---|
public Color getColor(int index)
Gets the palette color by index.
getColor
in interface IColorPalette
index
- The palette color index.
index
.
java.lang.IllegalArgumentException
- if color palette index
specified is out of the palette entries range.public Color[] getEntries()
Gets an array of Color
structures.
getEntries
in interface IColorPalette
Color
structure that make up this ColorPalette
.
Value: The entries.public int getEntriesCount()
Gets the entries count.
Value: The entries count.
getEntriesCount
in interface IColorPalette
public int getNearestColorIndex(Color color)
Gets the index of the nearest color.
getNearestColorIndex
in interface IColorPalette
color
- The color.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |