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 Modifier and Type Field Description static PdfBoxGraphics2DDrawControlDefault
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description protected
PdfBoxGraphics2DDrawControlDefault()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterShapeDraw(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
Called after shape was drawn.void
afterShapeFill(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
Called after shape was filled.Shape
transformShapeBeforeDraw(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
You may optional change the shape that is going to be drawn.Shape
transformShapeBeforeFill(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
You may optional change the shape that is going to be filled.
-
-
-
Field Detail
-
INSTANCE
public static final PdfBoxGraphics2DDrawControlDefault INSTANCE
-
-
Method Detail
-
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
public void afterShapeFill(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
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
public void afterShapeDraw(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
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
-
-