org.apache.fop.render

Class AbstractGraphics2DAdapter

Implemented Interfaces:
Graphics2DAdapter
Known Direct Subclasses:
AFPGraphics2DAdapter, PCLGraphics2DAdapter, PDFGraphics2DAdapter

public abstract class AbstractGraphics2DAdapter
extends java.lang.Object
implements Graphics2DAdapter

Graphics2DAdapter implementation for PCL and HP GL/2.

Method Summary

protected BufferedImage
paintToBufferedImage(Graphics2DImagePainter painter, RendererContext.RendererContextWrapper context, int resolution, boolean gray, boolean withAlpha)
Paints the image to a BufferedImage and returns that.
protected void
setRenderingHintsForBufferedImage(Graphics2D g2d)
Sets rendering hints on the Graphics2D created for painting to a BufferedImage.

Method Details

paintToBufferedImage

protected BufferedImage paintToBufferedImage(Graphics2DImagePainter painter,
                                             RendererContext.RendererContextWrapper context,
                                             int resolution,
                                             boolean gray,
                                             boolean withAlpha)
Paints the image to a BufferedImage and returns that.
Parameters:
painter - the painter which will paint the actual image
context - the renderer context for the current renderer
resolution - the requested bitmap resolution
gray - true if the generated image should be in grayscales
Returns:
the generated BufferedImage

setRenderingHintsForBufferedImage

protected void setRenderingHintsForBufferedImage(Graphics2D g2d)
Sets rendering hints on the Graphics2D created for painting to a BufferedImage. Subclasses can modify the settings to customize the behaviour.
Parameters:
g2d - the Graphics2D instance

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.