ColorPalette
Inheritance: java.lang.Object
public final class ColorPalette
Defines an array of colors that make up a color palette. The colors are 32-bit ARGB colors. Not inheritable.
Constructors
Constructor | Description |
---|---|
ColorPalette(int count) | Initializes a new instance of the ColorPalette class and IsCompactPalette is false. |
Methods
Method | Description |
---|---|
getEntries() | Gets an array of com.aspose.drawing.Color structures. |
isCompactPalette() | Gets or sets a value indicating whether compact palette is used. |
getFlags() | |
setFlags(int flags) | |
setEntries(int i, Color color) |
ColorPalette(int count)
public ColorPalette(int count)
Initializes a new instance of the ColorPalette
class and IsCompactPalette is false.
Parameters:
Parameter | Type | Description |
---|---|---|
count | int | The color palette entries. |
getEntries()
public Color[] getEntries()
Gets an array of com.aspose.drawing.Color
structures.
Returns:
com.aspose.drawing.Color[] - The entries. The array of com.aspose.drawing.Color
structure that make up this Aspose.Imaging.ColorPalette
.
isCompactPalette()
public boolean isCompactPalette()
Gets or sets a value indicating whether compact palette is used.
Returns:
boolean - true
if compact palette is used; otherwise, false
.
Compact palette means that image will contain only the specified palette entries if possible or in other words the image will be more compact and occupy less space; otherwise there will be 2^BitsPerPixel entries and image will reserve more space for all possible palette entries. Setting this value to true and changing palette entries may cause performance penalty since data movement may occur so use it carefully.
getFlags()
public int getFlags()
Returns: int
setFlags(int flags)
public void setFlags(int flags)
Parameters:
Parameter | Type | Description |
---|---|---|
flags | int |
setEntries(int i, Color color)
public void setEntries(int i, Color color)
Parameters:
Parameter | Type | Description |
---|---|---|
i | int | |
color | Color |