Package de.rototor.pdfbox.graphics2d
Class PdfBoxGraphics2DPaintApplier.PaintApplierState
java.lang.Object
de.rototor.pdfbox.graphics2d.PdfBoxGraphics2DPaintApplier.PaintApplierState
- Enclosing class:
PdfBoxGraphics2DPaintApplier
Internal State of the PaintApplyer. Allows derived classes to
change some states.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IPdfBoxGraphics2DColorMapper
protected Composite
protected org.apache.pdfbox.pdmodel.PDPageContentStream
private org.apache.pdfbox.cos.COSDictionary
protected org.apache.pdfbox.pdmodel.PDDocument
protected IPdfBoxGraphics2DImageEncoder
protected AffineTransform
This transform is only set, when we apply a nested paint (e.g.protected org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsState
protected org.apache.pdfbox.pdmodel.PDResources
(package private) AffineTransform
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
setupLuminosityMasking
(BufferedImage image, org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox) Setup a mask for the next fill/stroke operationvoid
setupLuminosityMasking
(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject formXObject) Setup a mask for the next fill/stroke operation.void
setupLuminosityMasking
(org.apache.pdfbox.pdmodel.graphics.PDXObject maskXObject, org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox) Setup a mask for the next fill/stroke operation.
-
Field Details
-
document
protected org.apache.pdfbox.pdmodel.PDDocument document -
contentStream
protected org.apache.pdfbox.pdmodel.PDPageContentStream contentStream -
colorMapper
-
imageEncoder
-
resources
protected org.apache.pdfbox.pdmodel.PDResources resources -
pdExtendedGraphicsState
protected org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsState pdExtendedGraphicsState -
composite
-
dictExtendedState
private org.apache.pdfbox.cos.COSDictionary dictExtendedState -
env
-
colorMapperEnv
-
imageEncoderEnv
-
tf
-
nestedTransform
This transform is only set, when we apply a nested paint (e.g. a TilingPattern's paint) -
shadingMaskModifier
-
-
Constructor Details
-
PaintApplierState
public PaintApplierState()
-
-
Method Details
-
ensureExtendedState
private void ensureExtendedState() -
setupLuminosityMasking
public void setupLuminosityMasking(BufferedImage image, org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox) throws IOException Setup a mask for the next fill/stroke operation- Parameters:
image
- the mask image. It will be used to generate a grayscale image, that will directly map to the alpha channel.boundingBox
- The bounding box of the masking. I.e. where to apply the mask- Throws:
IOException
-
setupLuminosityMasking
public void setupLuminosityMasking(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject formXObject) throws IOException Setup a mask for the next fill/stroke operation. It will use the BBox of the formXObject.- Parameters:
formXObject
- the mask form. It will be used to generate a grayscale image, that will directly map to the alpha channel.- Throws:
IOException
-
setupLuminosityMasking
public void setupLuminosityMasking(org.apache.pdfbox.pdmodel.graphics.PDXObject maskXObject, org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox) throws IOException Setup a mask for the next fill/stroke operation.- Parameters:
maskXObject
- a PDXObject (form or image) which generates a grayscale image for the masking. This image will directly map to the alpha channel.boundingBox
- The bounding box of the masking. I.e. where to apply the mask- Throws:
IOException
-