Package de.rototor.pdfbox.graphics2d
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 TypeMethodDescriptionvoid
Call this to ensure that the current shape has been walked on the content stream.org.apache.pdfbox.pdmodel.PDDocument
org.apache.pdfbox.pdmodel.PDResources
The 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.IPaintEnv
The shape information is need to be able to correctly render grandients.- Specified by:
getShapeToDraw
in 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.IPaintEnv
Call 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:
ensureShapeIsWalked
in interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv
- Throws:
IOException
-
getColorMapper
- Specified by:
getColorMapper
in interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv
- Returns:
- the color mapper
-
getImageEncoder
- Specified by:
getImageEncoder
in interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv
- Returns:
- the image encoder
-
getDocument
public org.apache.pdfbox.pdmodel.PDDocument getDocument()- Specified by:
getDocument
in interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv
- Returns:
- the document
-
getResources
public org.apache.pdfbox.pdmodel.PDResources getResources()- Specified by:
getResources
in interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv
- Returns:
- the resource of the content stream
-
getComposite
- Specified by:
getComposite
in interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv
- Returns:
- the
Graphics2D
Composite
-
getGraphics2D
- Specified by:
getGraphics2D
in interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv
- Returns:
- The PdfBoxGraphics2D
-
getXORMode
- Specified by:
getXORMode
in interfaceIPdfBoxGraphics2DPaintApplier.IPaintEnv
- Returns:
- the
Graphics2D
XOR ModeColor
or null if paint mode is active.
-