Class PDDeviceRGB
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace
org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB
- All Implemented Interfaces:
COSObjectable
This class represents an RGB color space.
- Version:
- $Revision: 1.8 $
- Author:
- Ben Litchfield
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe abbreviated name of this color space.static final PDDeviceRGBThis is the single instance of this class.static final StringThe name of this color space.Fields inherited from class org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace
array -
Method Summary
Modifier and TypeMethodDescriptioncreateColorModel(int bpc) Create a Java color model for this colorspace.protected ColorSpaceCreate a Java colorspace for this colorspace.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.Methods inherited from class org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace
getCOSObject, getJavaColorSpace, toString
-
Field Details
-
NAME
The name of this color space.- See Also:
-
ABBREVIATED_NAME
The abbreviated name of this color space.- See Also:
-
INSTANCE
This is the single instance of this class.
-
-
Method Details
-
getName
This will return the name of the color space.- 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.
-
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.
-