org.icepdf.core.pobjects.graphics
Class SoftMask
java.lang.Object
org.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.graphics.SoftMask
public class SoftMask
- extends Dictionary
Soft-mask Dictionary specifies the current soft mask in the graphics
state. The mask values shall be derived from those of the transparency group,
using one of the two methods in "11.5.2 Deriving a Soft Mask from Group Alpha",
and "11.5.3 Deriving a Soft Mask from Group Luminosity".
The S subtype entry shall specify which of the two derivation methods to use:
- If the subtype is Alpha, the transparency group XObject G shall be
evaluated to compute a group alpha only. The colours of the constituent
objects shall be ignored and the colour compositing computations shall
not be performed. The transfer function TR shall then be applied to the
computed group alpha to produce the mask values. Outside the bounding box
of the transparency group, the mask value shall be the result of applying
the transfer function to the input value 0.0.
- If the subtype is Luminosity, the transparency group XObject G shall
be composited with a fully opaque backdrop whose colour is everywhere
defined by the soft-mask dictionary's BC entry. The computed result colour
shall then be converted to a single-component luminosity value, and the
transfer function TR shall be applied to this luminosity to produce the
mask values. Outside the transparency group's bounding box, the mask value
shall be derived by transforming the BC colour to luminosity and applying
the transfer function to the result.
|
Constructor Summary |
SoftMask(Library library,
java.util.Hashtable dictionary)
|
|
Method Summary |
java.util.Vector<java.lang.Number> |
getBC()
An array of component values specifying the colour to be used as the
backdrop against which to composite the transparency group XObject G. |
Form |
getG()
A transparency group XObject (see "Transparency Group XObjects") to be
used as the source of alpha or colour values for deriving the mask. |
java.lang.String |
getS()
A subtype specifying the method to be used in deriving the mask values
from the transparency group specified by the G entry:
Alpha - The group's computed alpha shall be used, disregarding
its colour (see "Deriving a Soft Mask from Group Alpha").
LuminosityThe group's computed colour shall be converted to a
single-component luminosity value (see "Deriving a Soft Mask from
Group Luminosity").
|
| 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 |
SOFT_MASK_TYPE_ALPHA
public static final java.lang.String SOFT_MASK_TYPE_ALPHA
- See Also:
- Constant Field Values
SOFT_MASK_TYPE_LUMINOSITY
public static final java.lang.String SOFT_MASK_TYPE_LUMINOSITY
- See Also:
- Constant Field Values
SoftMask
public SoftMask(Library library,
java.util.Hashtable dictionary)
getS
public java.lang.String getS()
- A subtype specifying the method to be used in deriving the mask values
from the transparency group specified by the G entry:
- Alpha - The group's computed alpha shall be used, disregarding
its colour (see "Deriving a Soft Mask from Group Alpha").
- LuminosityThe group's computed colour shall be converted to a
single-component luminosity value (see "Deriving a Soft Mask from
Group Luminosity").
- Returns:
- subtype of the soft-mask dictionary.
getG
public Form getG()
- A transparency group XObject (see "Transparency Group XObjects") to be
used as the source of alpha or colour values for deriving the mask. If
the subtype S is Luminosity, the group attributes dictionary shall
contain a CS entry defining the colour space in which the compositing
computation is to be performed.
- Returns:
- Xobject associated with G, null otherwise.
getBC
public java.util.Vector<java.lang.Number> getBC()
- An array of component values specifying the colour to be used as the
backdrop against which to composite the transparency group XObject G.
This entry shall be consulted only if the subtype S is Luminosity. The
array shall consist of n numbers, where n is the number of components in
the colour space specified by the CS entry in the group attributes
dictionary (see "Transparency Group XObjects").
Default value: the colour space's initial value, representing black.
- Returns: