Class PdfBoxGraphics2D.PaintEnvImpl
java.lang.Object
de.rototor.pdfbox.graphics2d.PdfBoxGraphics2D.PaintEnvImpl
- All Implemented Interfaces:
IPdfBoxGraphics2DPaintApplier.IPaintEnv
- Enclosing class:
PdfBoxGraphics2D
private class PdfBoxGraphics2D.PaintEnvImpl
extends Object
implements IPdfBoxGraphics2DPaintApplier.IPaintEnv
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCall this to ensure that the current shape has been walked on the content stream.org.apache.pdfbox.pdmodel.PDDocumentorg.apache.pdfbox.pdmodel.PDResourcesThe shape information is need to be able to correctly render grandients.
-
Field Details
-
shapeToDraw
-
hasShapeBeenWalked
private boolean hasShapeBeenWalked -
useEvenOdd
private boolean useEvenOdd
-
-
Constructor Details
-
PaintEnvImpl
private PaintEnvImpl()
-
-
Method Details
-
getShapeToDraw
Description copied from interface:IPdfBoxGraphics2DPaintApplier.IPaintEnvThe shape information is need to be able to correctly render grandients.- Specified by:
getShapeToDrawin interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Returns:
- get the shape which will be drawn or filled with this paint. Null is returned if no shape is known.
-
ensureShapeIsWalked
Description copied from interface:IPdfBoxGraphics2DPaintApplier.IPaintEnvCall this to ensure that the current shape has been walked on the content stream. You are not allowed to do any graphics state changes after this, as this would be illegal in PDF. (But most PDF reader render this fine anyway...)
This mostly only needed for ShadedFills- Specified by:
ensureShapeIsWalkedin interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Throws:
IOException
-
getColorMapper
- Specified by:
getColorMapperin interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Returns:
- the color mapper
-
getImageEncoder
- Specified by:
getImageEncoderin interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Returns:
- the image encoder
-
getDocument
public org.apache.pdfbox.pdmodel.PDDocument getDocument()- Specified by:
getDocumentin interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Returns:
- the document
-
getResources
public org.apache.pdfbox.pdmodel.PDResources getResources()- Specified by:
getResourcesin interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Returns:
- the resource of the content stream
-
getComposite
- Specified by:
getCompositein interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Returns:
- the
Graphics2DComposite
-
getGraphics2D
- Specified by:
getGraphics2Din interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Returns:
- The PdfBoxGraphics2D
-
getXORMode
- Specified by:
getXORModein interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv- Returns:
- the
Graphics2DXOR ModeColoror null if paint mode is active.
-