org.icepdf.core.pobjects.graphics
Class SoftMask

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by 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:


Field Summary
static Name BC_KEY
           
static Name G_KEY
           
static Name S_KEY
           
static java.lang.String SOFT_MASK_TYPE_ALPHA
           
static java.lang.String SOFT_MASK_TYPE_LUMINOSITY
           
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
SoftMask(Library library, java.util.HashMap dictionary)
           
 
Method Summary
 java.util.List<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.
 Name 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, 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

S_KEY

public static final Name S_KEY

G_KEY

public static final Name G_KEY

BC_KEY

public static final Name BC_KEY

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
Constructor Detail

SoftMask

public SoftMask(Library library,
                java.util.HashMap dictionary)
Method Detail

getS

public Name getS()
A subtype specifying the method to be used in deriving the mask values from the transparency group specified by the G entry:

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.List<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: