org.pdfbox.pdmodel.graphics.color

Class PDSeparation

Implemented Interfaces:
COSObjectable

public class PDSeparation
extends PDColorSpace

This class represents a Separation color space.
Version:
$Revision: 1.4 $
Author:
Ben Litchfield

Field Summary

static String
NAME
The name of this color space.

Constructor Summary

PDSeparation()
Constructor.
PDSeparation(COSArray separation)
Constructor.

Method Summary

ColorModel
createColorModel(int bpc)
Create a Java color model for this colorspace.
ColorSpace
createColorSpace()
Create a Java colorspace for this colorspace.
PDColorSpace
getAlternateColorSpace()
This will get the alternate color space for this separation.
String
getColorantName()
This will get the separation name.
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.
PDFunction
getTintTransform()
This will get the tint transform function.
void
setAlternateColorSpace(PDColorSpace cs)
This will set the alternate color space.
void
setColorantName(String name)
This will set the separation name.
void
setTintTransform(PDFunction tint)
This will set the tint transform function.

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

createColorModel, createColorSpace, getCOSObject, getName, getNumberOfComponents

Field Details

NAME

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

Constructor Details

PDSeparation

public PDSeparation()
Constructor.

PDSeparation

public PDSeparation(COSArray separation)
Constructor.
Parameters:
separation - The array containing all separation information.

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.

getAlternateColorSpace

public PDColorSpace getAlternateColorSpace()
            throws IOException
This will get the alternate color space for this separation.
Returns:
The alternate color space.

getColorantName

public String getColorantName()
This will get the separation name.
Returns:
The name in the separation.

getName

public String getName()
This will return the name of the color space. For a PDSeparation object this will always return "Separation"
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.

getTintTransform

public PDFunction getTintTransform()
            throws IOException
This will get the tint transform function.
Returns:
The tint transform function.

setAlternateColorSpace

public void setAlternateColorSpace(PDColorSpace cs)
This will set the alternate color space.
Parameters:
cs - The alternate color space.

setColorantName

public void setColorantName(String name)
This will set the separation name.
Parameters:
name - The separation name.

setTintTransform

public void setTintTransform(PDFunction tint)
This will set the tint transform function.
Parameters:
tint - The tint transform function.