Package org.apache.fop.render.ps
Class PSGraphics2DAdapter
java.lang.Object
org.apache.fop.render.AbstractGraphics2DAdapter
org.apache.fop.render.ps.PSGraphics2DAdapter
- All Implemented Interfaces:
Graphics2DAdapter
Graphics2DAdapter implementation for PostScript.
-
Constructor Summary
ConstructorDescriptionPSGraphics2DAdapter
(org.apache.xmlgraphics.ps.PSGenerator gen, boolean clip, FontInfo fontInfo) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
paintImage
(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter, RendererContext context, int x, int y, int width, int height) Paints an arbitrary images on a given Graphics2D instance.Methods inherited from class org.apache.fop.render.AbstractGraphics2DAdapter
mpt2px, paintImage, paintToBufferedImage, setRenderingHintsForBufferedImage
-
Constructor Details
-
PSGraphics2DAdapter
public PSGraphics2DAdapter(org.apache.xmlgraphics.ps.PSGenerator gen, boolean clip, FontInfo fontInfo) Creates a new instance.- Parameters:
gen
- the PostScript generatorclip
- true if the image should be clipped
-
-
Method Details
-
paintImage
public void paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter, RendererContext context, int x, int y, int width, int height) throws IOException 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.- Parameters:
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- Throws:
IOException
- In case of an I/O error while writing the output format
-