Class PDSoftMask
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.state.PDSoftMask
-
- All Implemented Interfaces:
COSObjectable
public final class PDSoftMask extends java.lang.Object implements COSObjectable
Soft mask.
-
-
Field Summary
Fields Modifier and Type Field Description private COSArraybackdropColorprivate MatrixctmTo allow a soft mask to know the CTM at the time of activation of the ExtGState.private COSDictionarydictionaryprivate PDTransparencyGroupgroupprivate static org.apache.commons.logging.LogLOGprivate ResourceCacheresourceCacheprivate COSNamesubTypeprivate PDFunctiontransferFunction
-
Constructor Summary
Constructors Constructor 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 Modifier and Type Method Description static PDSoftMaskcreate(COSBase dictionary)Creates a new soft mask.static PDSoftMaskcreate(COSBase dictionary, ResourceCache resourceCache)Creates a new soft mask.COSArraygetBackdropColor()Returns the backdrop color.COSDictionarygetCOSObject()Convert this standard java object to a COS object.PDTransparencyGroupgetGroup()Returns the G entry of the soft mask objectMatrixgetInitialTransformationMatrix()Returns the CTM at the time the ExtGState was activated.COSNamegetSubType()Returns the subtype of the soft mask (Alpha, Luminosity) - S entryPDFunctiongetTransferFunction()Returns the transfer function.(package private) voidsetInitialTransformationMatrix(Matrix ctm)Set the CTM that is valid at the time the ExtGState was activated.
-
-
-
Field Detail
-
LOG
private static final org.apache.commons.logging.Log LOG
-
dictionary
private final COSDictionary dictionary
-
resourceCache
private final ResourceCache resourceCache
-
subType
private COSName subType
-
group
private PDTransparencyGroup group
-
backdropColor
private COSArray backdropColor
-
transferFunction
private PDFunction transferFunction
-
ctm
private Matrix ctm
To allow a soft mask to know the CTM at the time of activation of the ExtGState.
-
-
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- SMaskresourceCache- Resource cache, may be null.- Returns:
- the newly created instance of PDSoftMask
-
getCOSObject
public COSDictionary getCOSObject()
Description copied from interface:COSObjectableConvert this standard java object to a COS object.- Specified by:
getCOSObjectin interfaceCOSObjectable- 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 java.io.IOException
Returns the G entry of the soft mask object- Returns:
- form containing the transparency group
- Throws:
java.io.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 java.io.IOException
Returns the transfer function.- Returns:
- the transfer function
- Throws:
java.io.IOException- If we are unable to create the PDFunction object.
-
setInitialTransformationMatrix
void setInitialTransformationMatrix(Matrix ctm)
Set the CTM that is valid at the time the ExtGState was activated.- Parameters:
ctm- the transformation matrix
-
getInitialTransformationMatrix
public Matrix getInitialTransformationMatrix()
Returns the CTM at the time the ExtGState was activated.- Returns:
- the transformation matrix
-
-