public class PdfBoxGraphics2DPaintApplier extends Object implements IPdfBoxGraphics2DPaintApplier
NOTE: Objects of this class are stateful and *not* thread safe!
| Modifier and Type | Class and Description |
|---|---|
protected static class |
PdfBoxGraphics2DPaintApplier.PaintApplierState |
IPdfBoxGraphics2DPaintApplier.IPaintEnv| Constructor and Description |
|---|
PdfBoxGraphics2DPaintApplier() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyAsStrokingColor(Color color,
PdfBoxGraphics2DPaintApplier.PaintApplierState state) |
org.apache.pdfbox.pdmodel.graphics.shading.PDShading |
applyPaint(Paint paint,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
AffineTransform tf,
IPdfBoxGraphics2DPaintApplier.IPaintEnv env)
Apply the paint on the ContentStream
|
protected static <T> T |
getPropertyValue(Object obj,
String propertyGetter)
Get a property value from an object using reflection
|
public org.apache.pdfbox.pdmodel.graphics.shading.PDShading applyPaint(Paint paint, org.apache.pdfbox.pdmodel.PDPageContentStream contentStream, AffineTransform tf, IPdfBoxGraphics2DPaintApplier.IPaintEnv env) throws IOException
IPdfBoxGraphics2DPaintApplierapplyPaint in interface IPdfBoxGraphics2DPaintApplierpaint - the paint which should be appliedcontentStream - the content stream to apply the paint ontf - the current transform of the Graphics2D relative to the
contentStream default coordinate space. This is always a copy of the
current transform, so we can modify it.env - Environment for mapping the paint.IOException - if its not possible to write the paint into the contentStreamprotected void applyAsStrokingColor(Color color, PdfBoxGraphics2DPaintApplier.PaintApplierState state) throws IOException
IOExceptionprotected static <T> T getPropertyValue(Object obj, String propertyGetter)
T - the type of the property you want to get.obj - The object to get a property from.propertyGetter - method name of the getter, i.e. "getXY".Copyright © 2022. All rights reserved.