Class PDSeparation
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace
org.apache.pdfbox.pdmodel.graphics.color.PDSeparation
- All Implemented Interfaces:
COSObjectable
This class represents a Separation color space.
- Version:
- $Revision: 1.5 $
- Author:
- Ben Litchfield
-
Field Summary
FieldsFields inherited from class org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace
array -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateColorValues(COSBase tintValue) Returns the components of the color in the alternate colorspace for the given tint value.createColorModel(int bpc) Create a Java color model for this colorspace.protected ColorSpaceCreate a Java colorspace for this colorspace.This will get the alternate color space for this separation.This will get the separation name.Convert this standard java object to a COS object.getName()This will return the name of the color space.intThis will get the number of components that this color space is made up of.This will get the tint transform function.voidThis will set the alternate color space.voidsetColorantName(String name) This will set the separation name.voidsetTintTransform(PDFunction tint) This will set the tint transform function.Methods inherited from class org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace
getJavaColorSpace, toString
-
Field Details
-
NAME
The name of this color space.- See Also:
-
-
Constructor Details
-
PDSeparation
public PDSeparation()Constructor. -
PDSeparation
Constructor.- Parameters:
separation- The array containing all separation information.
-
-
Method Details
-
getCOSObject
Description copied from class:PDColorSpaceConvert this standard java object to a COS object.- Specified by:
getCOSObjectin interfaceCOSObjectable- Overrides:
getCOSObjectin classPDColorSpace- Returns:
- The cos object that matches this Java object.
-
getName
This will return the name of the color space. For a PDSeparation object this will always return "Separation"- Specified by:
getNamein classPDColorSpace- Returns:
- The name of the color space.
-
getNumberOfComponents
This will get the number of components that this color space is made up of.- Specified by:
getNumberOfComponentsin classPDColorSpace- Returns:
- The number of components in this color space.
- Throws:
IOException- If there is an error getting the number of color components.
-
createColorSpace
Create a Java colorspace for this colorspace.- Specified by:
createColorSpacein classPDColorSpace- Returns:
- A color space that can be used for Java AWT operations.
- Throws:
IOException- If there is an error creating the color space.
-
createColorModel
Create a Java color model for this colorspace.- Specified by:
createColorModelin classPDColorSpace- Parameters:
bpc- The number of bits per component.- Returns:
- A color model that can be used for Java AWT operations.
- Throws:
IOException- If there is an error creating the color model.
-
getColorantName
This will get the separation name.- Returns:
- The name in the separation.
-
setColorantName
This will set the separation name.- Parameters:
name- The separation name.
-
getAlternateColorSpace
This will get the alternate color space for this separation.- Returns:
- The alternate color space.
- Throws:
IOException- If there is an error getting the alternate color space.
-
setAlternateColorSpace
This will set the alternate color space.- Parameters:
cs- The alternate color space.
-
getTintTransform
This will get the tint transform function.- Returns:
- The tint transform function.
- Throws:
IOException- If there is an error creating the PDFunction
-
setTintTransform
This will set the tint transform function.- Parameters:
tint- The tint transform function.
-
calculateColorValues
Returns the components of the color in the alternate colorspace for the given tint value.- Parameters:
tintValue- the tint value- Returns:
- COSArray with the color components
- Throws:
IOException- If the tint function is not supported
-