|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.pdmodel.graphics.color.PDColorState
public class PDColorState
This class represents a color space and the color value for that colorspace.
Constructor Summary | |
---|---|
PDColorState()
Default constructor. |
|
PDColorState(COSArray csValues)
Constructor with an existing color set. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
PDColorSpace |
getColorSpace()
This will get the current colorspace. |
float[] |
getColorSpaceValue()
This will get the color space values. |
COSArray |
getCOSColorSpaceValue()
This will get the color space values. |
java.awt.Color |
getJavaColor()
Returns the Java AWT color based on the current color space and value. |
java.awt.Paint |
getPaint(int pageHeight)
Returns the Java AWT paint based on the current pattern. |
PDPatternResources |
getPattern()
This will get the current pattern. |
void |
setColorSpace(PDColorSpace value)
This will set the current colorspace. |
void |
setColorSpaceValue(float[] value)
This will update the colorspace values. |
static void |
setIccOverrideColor(java.awt.Color color)
Sets the default color to replace all colors in ICC color spaces . |
void |
setPattern(PDPatternResources patternValue)
This will update the current pattern. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDColorState()
public PDColorState(COSArray csValues)
csValues
- The color space values.Method Detail |
---|
public static void setIccOverrideColor(java.awt.Color color)
ICC color spaces
. This will work around
a potential JVM crash caused by broken native ICC color manipulation
code in the Sun class libraries.
The default override can be specified by setting the color code in
org.apache.pdfbox.ICC_override_color
system property
(see Color.getColor(String)
. If this system property is not
specified, then the override is not enabled unless this method is
explicitly called.
color
- ICC override color,
or null
to disable the overridepublic java.lang.Object clone()
clone
in class java.lang.Object
public java.awt.Color getJavaColor() throws java.io.IOException
java.io.IOException
- if the current color can not be createdpublic java.awt.Paint getPaint(int pageHeight) throws java.io.IOException
pageHeight
- the height of the current page
java.io.IOException
- if the current color can not be createdpublic PDColorSpace getColorSpace()
public void setColorSpace(PDColorSpace value)
value
- The new colorspace.public float[] getColorSpaceValue()
public COSArray getCOSColorSpaceValue()
public void setColorSpaceValue(float[] value)
value
- The new colorspace values.public PDPatternResources getPattern()
public void setPattern(PDPatternResources patternValue)
patternValue
- The new pattern.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |