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 ColorModel
private final Rectangle2D
private int
private final BufferedImage
private final Paint
private final PDFunction
Fields 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:
createContext
in interfacePaint
-
getTransparency
public int getTransparency()- Specified by:
getTransparency
in interfaceTransparency
-