org.pdfbox.pdmodel.graphics.color
Class PDLab
- COSObjectable
This class represents a Lab color space.
static String | NAME - The name of this color space.
|
NAME
public static final String NAME
The name of this color space.
PDLab
public PDLab()
Constructor.
PDLab
public PDLab(COSArray lab)
Constructor with array.
lab
- The underlying color space.
createColorModel
public ColorModel createColorModel(int bpc)
throws IOException
Create a Java color model for this colorspace.
- createColorModel in interface PDColorSpace
bpc
- The number of bits per component.
- A color model that can be used for Java AWT operations.
createColorSpace
public ColorSpace createColorSpace()
throws IOException
Create a Java colorspace for this colorspace.
- createColorSpace in interface PDColorSpace
- A color space that can be used for Java AWT operations.
getARange
public PDRange getARange()
This will get the valid range for the a component. If none is found
then the default will be returned, which is -100 to 100.
getBRange
public PDRange getBRange()
This will get the valid range for the b component. If none is found
then the default will be returned, which is -100 to 100.
getBlackPoint
public PDTristimulus getBlackPoint()
This will return the BlackPoint tristimulus. This is an optional field but
has defaults so this will never return null.
A default of 0,0,0 will be returned if the pdf does not have any values yet.
- The blackpoint tristimulus.
getName
public String getName()
This will return the name of the color space.
- getName in interface PDColorSpace
- The name of the color space.
getNumberOfComponents
public int getNumberOfComponents()
throws IOException
This will get the number of components that this color space is made up of.
- getNumberOfComponents in interface PDColorSpace
- The number of components in this color space.
getWhitepoint
public PDTristimulus getWhitepoint()
This will return the whitepoint tristimulus. As this is a required field
this will never return null. A default of 1,1,1 will be returned if the
pdf does not have any values yet.
- The whitepoint tristimulus.
setARange
public void setARange(PDRange range)
This will set the a range for this color space.
range
- The new range for the a component.
setBRange
public void setBRange(PDRange range)
This will set the b range for this color space.
range
- The new range for the b component.
setBlackPoint
public void setBlackPoint(PDTristimulus bp)
This will set the BlackPoint tristimulus. As this is a required field
this null should not be passed into this function.
bp
- The BlackPoint tristimulus.
setWhitepoint
public void setWhitepoint(PDTristimulus wp)
This will set the whitepoint tristimulus. As this is a required field
this null should not be passed into this function.
wp
- The whitepoint tristimulus.