org.pdfbox.pdmodel.graphics.color

Class PDDeviceRGB

Implemented Interfaces:
COSObjectable

public class PDDeviceRGB
extends PDColorSpace

This class represents an RGB color space.
Version:
$Revision: 1.8 $
Author:
Ben Litchfield

Field Summary

static String
ABBREVIATED_NAME
The abbreviated name of this color space.
static PDDeviceRGB
INSTANCE
This is the single instance of this class.
static String
NAME
The name of this color space.

Method Summary

ColorModel
createColorModel(int bpc)
Create a Java color model for this colorspace.
ColorSpace
createColorSpace()
Create a Java colorspace for this colorspace.
String
getName()
This will return the name of the color space.
int
getNumberOfComponents()
This will get the number of components that this color space is made up of.

Methods inherited from class org.pdfbox.pdmodel.graphics.color.PDColorSpace

createColorModel, createColorSpace, getCOSObject, getName, getNumberOfComponents

Field Details

ABBREVIATED_NAME

public static final String ABBREVIATED_NAME
The abbreviated name of this color space.

INSTANCE

public static final PDDeviceRGB INSTANCE
This is the single instance of this class.

NAME

public static final String NAME
The name of this color space.

Method Details

createColorModel

public ColorModel createColorModel(int bpc)
            throws IOException
Create a Java color model for this colorspace.
Overrides:
createColorModel in interface PDColorSpace
Parameters:
bpc - The number of bits per component.
Returns:
A color model that can be used for Java AWT operations.

createColorSpace

public ColorSpace createColorSpace()
            throws IOException
Create a Java colorspace for this colorspace.
Overrides:
createColorSpace in interface PDColorSpace
Returns:
A color space that can be used for Java AWT operations.

getName

public String getName()
This will return the name of the color space.
Overrides:
getName in interface PDColorSpace
Returns:
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.
Overrides:
getNumberOfComponents in interface PDColorSpace
Returns:
The number of components in this color space.