Package de.rototor.pdfbox.graphics2d
Class PdfBoxGraphics2DDrawControlDefault
java.lang.Object
de.rototor.pdfbox.graphics2d.PdfBoxGraphics2DDrawControlDefault
- All Implemented Interfaces:
IPdfBoxGraphics2DDrawControl
public class PdfBoxGraphics2DDrawControlDefault
extends Object
implements IPdfBoxGraphics2DDrawControl
Default implementation which does nothing. You can derive from it to only
override the needed methods
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.rototor.pdfbox.graphics2d.IPdfBoxGraphics2DDrawControl
IPdfBoxGraphics2DDrawControl.IDrawControlEnv
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called after shape was drawn.void
Called after shape was filled.You may optional change the shape that is going to be drawn.You may optional change the shape that is going to be filled.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PdfBoxGraphics2DDrawControlDefault
protected PdfBoxGraphics2DDrawControlDefault()
-
-
Method Details
-
transformShapeBeforeFill
public Shape transformShapeBeforeFill(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env) Description copied from interface:IPdfBoxGraphics2DDrawControl
You may optional change the shape that is going to be filled. You can also do other stuff here like drawing an overfill before the real shape.- Specified by:
transformShapeBeforeFill
in interfaceIPdfBoxGraphics2DDrawControl
- Parameters:
shape
- the shape that will be drawnenv
- Environment- Returns:
- the shape to be filled. If you return null, nothing will be filled
-
transformShapeBeforeDraw
public Shape transformShapeBeforeDraw(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env) Description copied from interface:IPdfBoxGraphics2DDrawControl
You may optional change the shape that is going to be drawn. You can also do other stuff here like drawing an overfill before the real shape.- Specified by:
transformShapeBeforeDraw
in interfaceIPdfBoxGraphics2DDrawControl
- Parameters:
shape
- the shape that will be drawnenv
- Environment- Returns:
- the shape to be filled. If you return null, nothing will be drawn
-
afterShapeFill
Description copied from interface:IPdfBoxGraphics2DDrawControl
Called after shape was filled. This method is always called, even ifIPdfBoxGraphics2DDrawControl.transformShapeBeforeFill(java.awt.Shape, IDrawControlEnv)
returns null.- Specified by:
afterShapeFill
in interfaceIPdfBoxGraphics2DDrawControl
- Parameters:
shape
- the shape that was filled. This is the original shape, not the one transformed byIPdfBoxGraphics2DDrawControl.transformShapeBeforeFill(java.awt.Shape, IDrawControlEnv)
.env
- Environment
-
afterShapeDraw
Description copied from interface:IPdfBoxGraphics2DDrawControl
Called after shape was drawn. This method is always called, even ifIPdfBoxGraphics2DDrawControl.transformShapeBeforeDraw(java.awt.Shape, IDrawControlEnv)
returns null.- Specified by:
afterShapeDraw
in interfaceIPdfBoxGraphics2DDrawControl
- Parameters:
shape
- the shape that was drawn. This is the original shape, not the one transformed byIPdfBoxGraphics2DDrawControl.transformShapeBeforeDraw(java.awt.Shape, IDrawControlEnv)
.env
- Environment
-