org.pdfbox.pdmodel.graphics.color
Class PDColorSpaceInstance
java.lang.Object
org.pdfbox.pdmodel.graphics.color.PDColorSpaceInstance
public class PDColorSpaceInstance
extends java.lang.Object
This class represents a color space and the color value for that colorspace.
PDColorSpaceInstance
public PDColorSpaceInstance()
Default constructor.
PDColorSpaceInstance
public PDColorSpaceInstance(COSArray csValues)
Constructor with an existing color set. Default colorspace is PDDeviceGray.
csValues
- The color space values.
createColor
public Color createColor()
throws IOException
Create the current color from the colorspace and values.
getCOSColorSpaceValue
public COSArray getCOSColorSpaceValue()
This will get the color space values. Either 1 for gray or 3 for RGB.
getColorSpace
public PDColorSpace getColorSpace()
This will get the current colorspace.
getColorSpaceValue
public float[] getColorSpaceValue()
This will get the color space values. Either 1 for gray or 3 for RGB.
setColorSpace
public void setColorSpace(PDColorSpace value)
This will set the current colorspace.
value
- The new colorspace.
setColorSpaceValue
public void setColorSpaceValue(float[] value)
This will update the colorspace values.
value
- The new colorspace values.