|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pdfbox.pdmodel.graphics.color.PDColorSpace
org.apache.pdfbox.pdmodel.graphics.color.PDIndexed
public class PDIndexed
This class represents an Indexed color space.
| Field Summary | |
|---|---|
static String |
ABBREVIATED_NAME
The abbreviated name of this color space. |
static String |
NAME
The name of this color space. |
| Constructor Summary | |
|---|---|
PDIndexed()
Constructor, default DeviceRGB, hival 255. |
|
PDIndexed(COSArray indexedArray)
Constructor. |
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace |
|---|
getCOSObject, getJavaColorSpace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
public static final String ABBREVIATED_NAME
| Constructor Detail |
|---|
public PDIndexed()
public PDIndexed(COSArray indexedArray)
indexedArray - The array containing the indexed parameters| Method Detail |
|---|
public 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 PDColorSpace
protected 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 mask
IOException - 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 value
IOException - If the tint function is not supported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||