Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.graphics.color
Class PDColorSpace

    java.lang.Object
      org.pdfbox.pdmodel.graphics.color.PDColorSpace

All Implemented Interfaces:
  COSObjectable

Direct Known Subclasses:
  PDCalGray, PDCalRGB, PDDeviceCMYK, PDDeviceGray, PDDeviceN, PDDeviceRGB, PDICCBased, PDIndexed, PDLab, PDPattern, PDSeparation

public abstract class PDColorSpace
extends Object
implements COSObjectable

This class represents a color space in a pdf document.

Version:
  $Revision: 1.4 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

Constructor Summary
`PDColorSpace()`

Method Summary
`abstract ColorModel` | `createColorModel(int bpc)` Create a Java color model for this colorspace.
`abstract ColorSpace` | `createColorSpace()` Create a Java colorspace for this colorspace.
`COSBase` | `getCOSObject()` Convert this standard java object to a COS object.
`abstract String` | `getName()` This will return the name of the color space.
`abstract int` | `getNumberOfComponents()` This will get the number of components that this color space is made up of.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PDColorSpace

    public PDColorSpace()

Method Detail

### getName

    public abstract String getName()

  This will return the name of the color space.

  Returns:
    The name of the color space.

### getNumberOfComponents

    public abstract int getNumberOfComponents()
                                       throws IOException

  This will get the number of components that this color space is made up of.

  Returns:
    The number of components in this color space.
  Throws:
    `IOException` - If there is an error getting the number of color components.

### getCOSObject

    public COSBase getCOSObject()

  Convert this standard java object to a COS object.

  Specified by:
    `getCOSObject` in interface `COSObjectable`
  Returns:
    The cos object that matches this Java object.

### createColorSpace

    public abstract ColorSpace createColorSpace()
                                         throws IOException

  Create a Java colorspace for this colorspace.

  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 abstract ColorModel createColorModel(int bpc)
                                         throws IOException

  Create a Java color model for this colorspace.

  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD