Graphics2DAdapterAFPGraphics2DAdapter, Java2DGraphics2DAdapter, PSGraphics2DAdapterpublic abstract class AbstractGraphics2DAdapter extends java.lang.Object implements Graphics2DAdapter
| Constructor | Description |
|---|---|
AbstractGraphics2DAdapter() |
| Modifier and Type | Method | Description |
|---|---|---|
protected int |
mpt2px(int unit,
int resolution) |
Converts millipoints to pixels
|
void |
paintImage(Graphics2DImagePainter painter,
RendererContext context,
int x,
int y,
int width,
int height) |
Deprecated.
|
protected java.awt.image.BufferedImage |
paintToBufferedImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
RendererContext.RendererContextWrapper context,
int resolution,
boolean gray,
boolean withAlpha) |
Paints the image to a BufferedImage and returns that.
|
protected void |
setRenderingHintsForBufferedImage(java.awt.Graphics2D g2d) |
Sets rendering hints on the Graphics2D created for painting to a BufferedImage.
|
paintImageprotected java.awt.image.BufferedImage paintToBufferedImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
RendererContext.RendererContextWrapper context,
int resolution,
boolean gray,
boolean withAlpha)
painter - the painter which will paint the actual imagecontext - the renderer context for the current rendererresolution - the requested bitmap resolutiongray - true if the generated image should be in grayscaleswithAlpha - true if an alpha channel should be createdprotected int mpt2px(int unit,
int resolution)
unit - the unit to convert in mptsresolution - the target resolutionprotected void setRenderingHintsForBufferedImage(java.awt.Graphics2D g2d)
g2d - the Graphics2D instancepublic void paintImage(Graphics2DImagePainter painter, RendererContext context, int x, int y, int width, int height) throws java.io.IOException
paintImage in interface Graphics2DAdapterpainter - the painter which will paint the actual imagecontext - the renderer context for the current rendererx - X position of the imagey - Y position of the imagewidth - width of the imageheight - height of the imagejava.io.IOException - In case of an I/O error while writing the output formatCopyright 1999-2016 The Apache Software Foundation. All Rights Reserved.