|
fop 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.render.AbstractGraphics2DAdapter
Abstract base class for Graphics2DAdapter implementations.
Constructor Summary | |
AbstractGraphics2DAdapter()
|
Method Summary | |
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)
Paints an arbitrary images on a given Graphics2D instance. The renderer providing this functionality must set up a Graphics2D instance so that the image with the given extents (in mpt) can be painted by the painter passed to this method. The Graphics2DImagePainter is then passed this Graphics2D instance so the image can be painted. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.fop.render.Graphics2DAdapter |
paintImage |
Constructor Detail |
public AbstractGraphics2DAdapter()
Method Detail |
protected 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 created
protected int mpt2px(int unit, int resolution)
unit
- the unit to convert in mptsresolution
- the target resolution
protected 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 Graphics2DAdapter
painter
- 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 image
java.io.IOException
- In case of an I/O error while writing the output format
|
fop 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |