Package org.apache.pdfbox.rendering
Class SoftMask
java.lang.Object
org.apache.pdfbox.rendering.SoftMask
- All Implemented Interfaces:
Paint,Transparency
A Paint which applies a soft mask to an underlying Paint.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ColorModelprivate final Rectangle2Dprivate intprivate final BufferedImageprivate final Paintprivate final PDFunctionFields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT -
Constructor Summary
ConstructorsConstructorDescriptionSoftMask(Paint paint, BufferedImage mask, Rectangle2D bboxDevice, PDColor backdropColor, PDFunction transferFunction) Creates a new soft mask paint. -
Method Summary
Modifier and TypeMethodDescriptioncreateContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) int
-
Field Details
-
ARGB_COLOR_MODEL
-
paint
-
mask
-
bboxDevice
-
bc
private int bc -
transferFunction
-
-
Constructor Details
-
SoftMask
SoftMask(Paint paint, BufferedImage mask, Rectangle2D bboxDevice, PDColor backdropColor, PDFunction transferFunction) Creates a new soft mask paint.- Parameters:
paint- underlying paint.mask- soft maskbboxDevice- bbox of the soft mask in the underlying Graphics2D device spacebackdropColor- the color to be used outside the transparency group’s bounding box; if null, black will be used.transferFunction- the transfer function, may be null.
-
-
Method Details
-
createContext
public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) - Specified by:
createContextin interfacePaint
-
getTransparency
public int getTransparency()- Specified by:
getTransparencyin interfaceTransparency
-