org.icepdf.core.pobjects.graphics
Class Separation
java.lang.Object
org.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.graphics.PColorSpace
org.icepdf.core.pobjects.graphics.Separation
public class Separation
- extends PColorSpace
Separation Color Space background:
Color output devices produce full color by combining primary or process
colorants in varying amounts. On an additive color device such as a display,
the primary colorants consist of red, green, and blue phosphors; on a
subtractive device such as a printer, they typically consist of cyan, magenta,
yellow, and sometimes black inks. In addition, some devices can apply special
colorants, often called spot colorants, to produce effects that cannot be
achieved with the standard process colorants alone. Examples include metallic
and fluorescent colors and special textures.
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]
- The alternateSpace parameter must be an array or name object that
identifies the alternate color space, which can be any device or
CIE-based color space but not another special color space (Pattern,
Indexed, Separation, or DeviceN).
- The tintTransform parameter must be a function.
During subsequent painting operations, an application
calls this function to transform a tint value into color component values
in the alternate color space. The function is called with the tint value
and must return the corresponding color component values. That is, the
number of components and the interpretation of their values depend on the
alternate color space.
- Since:
- 1.0
|
Constructor Summary |
protected |
Separation(Library l,
java.util.HashMap 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,
boolean fillAndStroke)
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()
|
boolean |
isNamedColor()
|
| Methods inherited from class org.icepdf.core.pobjects.Dictionary |
getEntries, getFloat, getInt, getLibrary, getNumber, 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 |
SEPARATION_KEY
public static final Name SEPARATION_KEY
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
Separation
protected Separation(Library l,
java.util.HashMap 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 - libraryh - dictionary entriesname - name of colourspace, always seperationalternateSpace - name of alternative colour spacetintTransform - function which defines the tint transform
getNumComponents
public int getNumComponents()
- Returns the number of components in this colour space.
- Specified by:
getNumComponents in class PColorSpace
- Returns:
- number of components
isNamedColor
public boolean isNamedColor()
getColor
public java.awt.Color getColor(float[] components,
boolean fillAndStroke)
- Gets the colour in RGB represented by the array of colour components
- Specified by:
getColor in class PColorSpace
- Parameters:
components - array of component colour datafillAndStroke - true indicates a fill or stroke operation, so we
will try to used the named colour and tint. This
is generally not do for images.
- Returns:
- new RGB colour composed from the components array.
getTint
public float getTint()