public class PDIndexed extends PDColorSpace
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ABBREVIATED_NAME
The abbreviated name of this color space.
|
static java.lang.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.
|
java.awt.image.ColorModel |
createColorModel(int bpc)
Create a Java color model for this colorspace.
|
java.awt.image.ColorModel |
createColorModel(int bpc,
int mask)
Create a Java color model for this colorspace including the given mask value.
|
protected java.awt.color.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.
|
java.lang.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 java.lang.String NAME
public static final java.lang.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 java.io.IOException
getNumberOfComponents in class PDColorSpacejava.io.IOException - If there is an error getting the number of color components.public java.lang.String getName()
getName in class PDColorSpaceprotected java.awt.color.ColorSpace createColorSpace()
throws java.io.IOException
createColorSpace in class PDColorSpacejava.io.IOException - If there is an error creating the color space.public java.awt.image.ColorModel createColorModel(int bpc)
throws java.io.IOException
createColorModel in class PDColorSpacebpc - The number of bits per component.java.io.IOException - If there is an error creating the color model.public java.awt.image.ColorModel createColorModel(int bpc,
int mask)
throws java.io.IOException
bpc - The number of bits per component of the indexed color model.mask - the mask value, -1 indicates no maskjava.io.IOException - If there is an error creating the color model.public PDColorSpace getBaseColorSpace() throws java.io.IOException
java.io.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 java.io.IOException
lookupIndex - The zero-based index into the table, should not exceed the high value.componentNumber - The component number, probably 1,2,3,3.java.io.IOException - If there is an error looking up the color.public byte[] getLookupData()
throws java.io.IOException
java.io.IOException - if an error occurs.public void setLookupColor(int lookupIndex,
int componentNumber,
int color)
throws java.io.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.java.io.IOException - If there is an error looking up the color.public float[] calculateColorValues(int index)
throws java.io.IOException
index - the index of the color valuejava.io.IOException - If the tint function is not supported