org.icepdf.core.pobjects.graphics
Class Separation

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.graphics.PColorSpace
          extended by org.icepdf.core.pobjects.graphics.Separation

public class Separation
extends PColorSpace

Separation Color Space background:

A Separation color space (PDF 1.2) provides a means for specifying the use of additional colorants or for isolating the control of individual color components of a device color space for a subtractive device. When such a space is the current color space, the current color is a single-component value, called a tint, that controls the application of the given colorant or color components only.

A Separation color space is defined as follows:
[/Separation name alternateSpace tintTransform]

Since:
1.0

Field Summary
protected  PColorSpace alternate
           
static java.lang.String COLORANT_ALL
           
static java.lang.String COLORANT_NONE
           
protected  java.awt.Color namedColor
           
protected  Function tintTransform
           
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, inited, isDeleted, isNew, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
protected Separation(Library l, java.util.Hashtable h, java.lang.Object name, java.lang.Object alternateSpace, java.lang.Object tintTransform)
          Create a new Seperation colour space.
 
Method Summary
 java.awt.Color getColor(float[] components)
          Gets the colour in RGB represented by the array of colour components
 int getNumComponents()
          Returns the number of components in this colour space.
 float getTint()
           
 
Methods inherited from class org.icepdf.core.pobjects.graphics.PColorSpace
getColorSpace, getColorSpace, getDescription, normaliseComponentsToFloats, reverse, reverseInPlace, reverseInPlace
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

namedColor

protected java.awt.Color namedColor

alternate

protected PColorSpace alternate

tintTransform

protected Function tintTransform

COLORANT_ALL

public static final java.lang.String COLORANT_ALL
See Also:
Constant Field Values

COLORANT_NONE

public static final java.lang.String COLORANT_NONE
See Also:
Constant Field Values
Constructor Detail

Separation

protected Separation(Library l,
                     java.util.Hashtable h,
                     java.lang.Object name,
                     java.lang.Object alternateSpace,
                     java.lang.Object tintTransform)
Create a new Seperation colour space. Separation is specified using [/Seperation name alternateSpace tintTransform]

Parameters:
l - library
h - dictionary entries
name - name of colourspace, always seperation
alternateSpace - name of alternative colour space
tintTransform - function which defines the tint transform
Method Detail

getNumComponents

public int getNumComponents()
Returns the number of components in this colour space.

Specified by:
getNumComponents in class PColorSpace
Returns:
number of components

getColor

public java.awt.Color getColor(float[] components)
Gets the colour in RGB represented by the array of colour components

Specified by:
getColor in class PColorSpace
Parameters:
components - array of component colour data
Returns:
new RGB colour composed from the components array.

getTint

public float getTint()