org.pdfbox.pdmodel.graphics.color
Class PDPattern

java.lang.Object
  extended byorg.pdfbox.pdmodel.graphics.color.PDColorSpace
      extended byorg.pdfbox.pdmodel.graphics.color.PDPattern
All Implemented Interfaces:
COSObjectable

public class PDPattern
extends PDColorSpace

This class represents a Pattern color space.

Version:
$Revision: 1.4 $
Author:
Ben Litchfield

Field Summary
static String NAME
          The name of this color space.
 
Constructor Summary
PDPattern()
          Default constructor.
PDPattern(COSArray pattern)
          Constructor.
 
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
getCOSObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

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

See Also:
Constant Field Values
Constructor Detail

PDPattern

public PDPattern()
Default constructor.


PDPattern

public PDPattern(COSArray pattern)
Constructor.

Parameters:
pattern - The pattern array.
Method Detail

getName

public String getName()
This will return the name of the color space.

Specified by:
getName in class 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.

Specified by:
getNumberOfComponents in class PDColorSpace
Returns:
The number of components in this color space.
Throws:
IOException - If there is an error getting the number of color components.

createColorSpace

public ColorSpace createColorSpace()
                            throws IOException
Create a Java colorspace for this colorspace.

Specified by:
createColorSpace in class PDColorSpace
Returns:
A color space that can be used for Java AWT operations.
Throws:
IOException - If there is an error creating the color space.

createColorModel

public ColorModel createColorModel(int bpc)
                            throws IOException
Create a Java color model for this colorspace.

Specified by:
createColorModel in class PDColorSpace
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.