public class PDIndexed extends PDColorSpace
| Modifier and Type | Field and Description |
|---|---|
static String |
ABBREVIATED_NAME
The abbreviated name of this color space.
|
static String |
NAME
The name of this color space.
|
array| Constructor and Description |
|---|
PDIndexed()
Constructor, default DeviceRGB, hival 255.
|
PDIndexed(COSArray indexedArray)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
float[] |
calculateColorValues(int index)
Returns the components of the color for the given index.
|
ColorModel |
createColorModel(int bpc)
Create a Java color model for this colorspace.
|
ColorModel |
createColorModel(int bpc,
int mask)
Create a Java color model for this colorspace including the given mask value.
|
protected ColorSpace |
createColorSpace()
Create a Java colorspace for this colorspace.
|
PDColorSpace |
getBaseColorSpace()
This will get the color space that acts as the index for this color space.
|
COSBase |
getCOSObject()
Convert this standard java object to a COS object.
|
int |
getHighValue()
Get the highest value for the lookup.
|
byte[] |
getLookupData()
Get the lookup data table.
|
String |
getName()
This will return the name of the color space.
|
int |
getNumberOfComponents()
This will return the number of color components.
|
int |
lookupColor(int lookupIndex,
int componentNumber)
This will perform a lookup into the color lookup table.
|
void |
setBaseColorSpace(PDColorSpace base)
This will set the base color space.
|
void |
setHighValue(int high)
This will set the highest value that is allowed.
|
void |
setLookupColor(int lookupIndex,
int componentNumber,
int color)
This will set a color in the color lookup table.
|
getJavaColorSpace, toStringpublic static final String NAME
public static final String ABBREVIATED_NAME
public PDIndexed()
public PDIndexed(COSArray indexedArray)
indexedArray - The array containing the indexed parameterspublic COSBase getCOSObject()
PDColorSpacegetCOSObject in interface COSObjectablegetCOSObject in class PDColorSpacepublic int getNumberOfComponents()
throws IOException
getNumberOfComponents in class PDColorSpaceIOException - If there is an error getting the number of color components.public String getName()
getName in class PDColorSpaceprotected ColorSpace createColorSpace() throws IOException
createColorSpace in class PDColorSpaceIOException - If there is an error creating the color space.public ColorModel createColorModel(int bpc) throws IOException
createColorModel in class PDColorSpacebpc - The number of bits per component.IOException - If there is an error creating the color model.public ColorModel createColorModel(int bpc, int mask) throws IOException
bpc - The number of bits per component of the indexed color model.mask - the mask value, -1 indicates no maskIOException - If there is an error creating the color model.public PDColorSpace getBaseColorSpace() throws IOException
IOException - If there is error creating the base color space.public void setBaseColorSpace(PDColorSpace base)
base - The base color space to use as the index.public int getHighValue()
public void setHighValue(int high)
high - The highest value for the lookup table.public int lookupColor(int lookupIndex,
int componentNumber)
throws IOException
lookupIndex - The zero-based index into the table, should not exceed the high value.componentNumber - The component number, probably 1,2,3,3.IOException - If there is an error looking up the color.public byte[] getLookupData()
throws IOException
IOException - if an error occurs.public void setLookupColor(int lookupIndex,
int componentNumber,
int color)
throws IOException
lookupIndex - The zero-based index into the table, should not exceed the high value.componentNumber - The component number, probably 1,2,3,3.color - The color that will go into the table.IOException - If there is an error looking up the color.public float[] calculateColorValues(int index)
throws IOException
index - the index of the color valueIOException - If the tint function is not supportedCopyright © 2002-2015 The Apache Software Foundation. All Rights Reserved.