public class AFPGraphics2DAdapter extends AbstractGraphics2DAdapter
Constructor and Description |
---|
AFPGraphics2DAdapter(AFPPaintingState paintingState)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
protected int |
mpt2px(int unit,
int resolution)
Converts millipoints to pixels
|
void |
paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
RendererContext rendererContext,
int x,
int y,
int width,
int height)
Paints an arbitrary images on a given Graphics2D instance.
|
paintImage, paintToBufferedImage, setRenderingHintsForBufferedImage
public AFPGraphics2DAdapter(AFPPaintingState paintingState)
paintingState
- the AFP painting statepublic void paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter, RendererContext rendererContext, int x, int y, int width, int height) throws IOException
painter
- the painter which will paint the actual imagerendererContext
- the renderer context for the current rendererx
- X position of the imagey
- Y position of the imagewidth
- width of the imageheight
- height of the imageIOException
- In case of an I/O error while writing the output formatprotected int mpt2px(int unit, int resolution)
mpt2px
in class AbstractGraphics2DAdapter
unit
- the unit to convert in mptsresolution
- the target resolutionCopyright © 2025 Apache Software Foundation. All rights reserved.