Package de.rototor.pdfbox.graphics2d
Class PdfBoxGraphics2DPaintApplier.PaintApplierState
- java.lang.Object
-
- de.rototor.pdfbox.graphics2d.PdfBoxGraphics2DPaintApplier.PaintApplierState
-
- Enclosing class:
- PdfBoxGraphics2DPaintApplier
public static class PdfBoxGraphics2DPaintApplier.PaintApplierState extends java.lang.ObjectInternal State of the PaintApplyer. Allows derived classes to change some states.
-
-
Field Summary
Fields Modifier and Type Field Description protected IPdfBoxGraphics2DColorMappercolorMapperprivate IPdfBoxGraphics2DColorMapper.IColorMapperEnvcolorMapperEnvprotected java.awt.Compositecompositeprotected org.apache.pdfbox.pdmodel.PDPageContentStreamcontentStreamprivate org.apache.pdfbox.cos.COSDictionarydictExtendedStateprotected org.apache.pdfbox.pdmodel.PDDocumentdocumentprivate IPdfBoxGraphics2DPaintApplier.IPaintEnvenvprotected IPdfBoxGraphics2DImageEncoderimageEncoderprivate IPdfBoxGraphics2DImageEncoder.IPdfBoxGraphics2DImageEncoderEnvimageEncoderEnvprotected java.awt.geom.AffineTransformnestedTransformThis transform is only set, when we apply a nested paint (e.g.protected org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsStatepdExtendedGraphicsStateprotected org.apache.pdfbox.pdmodel.PDResourcesresourcesprivate PdfBoxGraphics2DPaintApplier.ShadingMaskModifiershadingMaskModifier(package private) java.awt.geom.AffineTransformtf
-
Constructor Summary
Constructors Constructor Description PaintApplierState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidensureExtendedState()voidsetupLuminosityMasking(java.awt.image.BufferedImage image, org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox)Setup a mask for the next fill/stroke operationvoidsetupLuminosityMasking(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject formXObject)Setup a mask for the next fill/stroke operation.voidsetupLuminosityMasking(org.apache.pdfbox.pdmodel.graphics.PDXObject maskXObject, org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox)Setup a mask for the next fill/stroke operation.
-
-
-
Field Detail
-
document
protected org.apache.pdfbox.pdmodel.PDDocument document
-
contentStream
protected org.apache.pdfbox.pdmodel.PDPageContentStream contentStream
-
colorMapper
protected IPdfBoxGraphics2DColorMapper colorMapper
-
imageEncoder
protected IPdfBoxGraphics2DImageEncoder imageEncoder
-
resources
protected org.apache.pdfbox.pdmodel.PDResources resources
-
pdExtendedGraphicsState
protected org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsState pdExtendedGraphicsState
-
composite
protected java.awt.Composite composite
-
dictExtendedState
private org.apache.pdfbox.cos.COSDictionary dictExtendedState
-
env
private IPdfBoxGraphics2DPaintApplier.IPaintEnv env
-
colorMapperEnv
private IPdfBoxGraphics2DColorMapper.IColorMapperEnv colorMapperEnv
-
imageEncoderEnv
private IPdfBoxGraphics2DImageEncoder.IPdfBoxGraphics2DImageEncoderEnv imageEncoderEnv
-
tf
java.awt.geom.AffineTransform tf
-
nestedTransform
protected java.awt.geom.AffineTransform nestedTransform
This transform is only set, when we apply a nested paint (e.g. a TilingPattern's paint)
-
shadingMaskModifier
private PdfBoxGraphics2DPaintApplier.ShadingMaskModifier shadingMaskModifier
-
-
Method Detail
-
ensureExtendedState
private void ensureExtendedState()
-
setupLuminosityMasking
public void setupLuminosityMasking(java.awt.image.BufferedImage image, org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox) throws java.io.IOExceptionSetup 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:
java.io.IOException
-
setupLuminosityMasking
public void setupLuminosityMasking(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject formXObject) throws java.io.IOExceptionSetup 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:
java.io.IOException
-
setupLuminosityMasking
public void setupLuminosityMasking(org.apache.pdfbox.pdmodel.graphics.PDXObject maskXObject, org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox) throws java.io.IOExceptionSetup 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:
java.io.IOException
-
-