Package de.rototor.pdfbox.graphics2d
Interface IPdfBoxGraphics2DDrawControl
-
- All Known Implementing Classes:
PdfBoxGraphics2DDrawControlDefault
public interface IPdfBoxGraphics2DDrawControl
Allows you to influence the fill and draw operations. You can alter the shape to draw/fill, you can even filter out the complete draw/fill operation. And you can draw additional stuff after the draw/fill operation, e.g. to implement overfill.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IPdfBoxGraphics2DDrawControl.IDrawControlEnv
The environment of the draw operation
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
transformShapeBeforeFill
Shape transformShapeBeforeFill(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
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.- Parameters:
shape
- the shape that will be drawnenv
- Environment- Returns:
- the shape to be filled. If you return null, nothing will be filled
-
transformShapeBeforeDraw
Shape transformShapeBeforeDraw(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
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.- Parameters:
shape
- the shape that will be drawnenv
- Environment- Returns:
- the shape to be filled. If you return null, nothing will be drawn
-
afterShapeFill
void afterShapeFill(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
Called after shape was filled. This method is always called, even iftransformShapeBeforeFill(java.awt.Shape, IDrawControlEnv)
returns null.- Parameters:
shape
- the shape that was filled. This is the original shape, not the one transformed bytransformShapeBeforeFill(java.awt.Shape, IDrawControlEnv)
.env
- Environment
-
afterShapeDraw
void afterShapeDraw(Shape shape, IPdfBoxGraphics2DDrawControl.IDrawControlEnv env)
Called after shape was drawn. This method is always called, even iftransformShapeBeforeDraw(java.awt.Shape, IDrawControlEnv)
returns null.- Parameters:
shape
- the shape that was drawn. This is the original shape, not the one transformed bytransformShapeBeforeDraw(java.awt.Shape, IDrawControlEnv)
.env
- Environment
-
-