org.apache.pdfbox.pdmodel.graphics.state

## Class PDSoftMask

- java.lang.Object
- - org.apache.pdfbox.pdmodel.graphics.state.PDSoftMask

All Implemented Interfaces:
  COSObjectable

    public final class PDSoftMask
    extends Object
    implements COSObjectable

Soft mask.

Author:
  Kühn & Weyh Software GmbH

### Constructor Summary

Constructors
Constructor and Description
`PDSoftMask(COSDictionary dictionary)` Creates a new soft mask.
`PDSoftMask(COSDictionary dictionary, ResourceCache resourceCache)` Creates a new soft mask.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static PDSoftMask` `create(COSBase dictionary)` Creates a new soft mask.
`static PDSoftMask` `create(COSBase dictionary, ResourceCache resourceCache)` Creates a new soft mask.
`COSArray` `getBackdropColor()` Returns the backdrop color.
`COSDictionary` `getCOSObject()` Convert this standard java object to a COS object.
`PDTransparencyGroup` `getGroup()` Returns the G entry of the soft mask object
`Matrix` `getInitialTransformationMatrix()` Returns the CTM at the time the ExtGState was activated.
`COSName` `getSubType()` Returns the subtype of the soft mask (Alpha, Luminosity) - S entry
`PDFunction` `getTransferFunction()` Returns the transfer function.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PDSoftMask

    public PDSoftMask(COSDictionary dictionary)

Creates a new soft mask.

Parameters:
  `dictionary` - The soft mask dictionary.

#### PDSoftMask

    public PDSoftMask(COSDictionary dictionary,
                      ResourceCache resourceCache)

Creates a new soft mask.

Parameters:
  `dictionary` - The soft mask dictionary.
  `resourceCache` - Resource cache, may be null.

### Method Detail

#### create

    public static PDSoftMask create(COSBase dictionary)

Creates a new soft mask.

Parameters:
  `dictionary` - SMask
Returns:
  the newly created instance of PDSoftMask

#### create

    public static PDSoftMask create(COSBase dictionary,
                                    ResourceCache resourceCache)

Creates a new soft mask.

Parameters:
  `dictionary` - SMask
  `resourceCache` - Resource cache, may be null.
Returns:
  the newly created instance of PDSoftMask

#### getCOSObject

    public COSDictionary getCOSObject()

Description copied from interface: `COSObjectable`
Convert this standard java object to a COS object.

Specified by:
  `getCOSObject` in interface `COSObjectable`
Returns:
  The cos object that matches this Java object.

#### getSubType

    public COSName getSubType()

Returns the subtype of the soft mask (Alpha, Luminosity) - S entry

Returns:
  the subtype of the soft mask

#### getGroup

    public PDTransparencyGroup getGroup()
                                 throws IOException

Returns the G entry of the soft mask object

Returns:
  form containing the transparency group
Throws:
  `IOException` - if the group could not be read

#### getBackdropColor

    public COSArray getBackdropColor()

Returns the backdrop color.

Returns:
  the backdrop color

#### getTransferFunction

    public PDFunction getTransferFunction()
                                   throws IOException

Returns the transfer function.

Returns:
  the transfer function
Throws:
  `IOException` - If we are unable to create the PDFunction object.

#### getInitialTransformationMatrix

    public Matrix getInitialTransformationMatrix()

Returns the CTM at the time the ExtGState was activated.

Returns:
  the transformation matrix