org.apache.batik.bridge

Class RepaintManager

public class RepaintManager extends Object

This class manages the rendering of a GVT tree.
Field Summary
protected ImageRendererrenderer
The renderer used to repaint the buffer.
Constructor Summary
RepaintManager(ImageRenderer r)
Creates a new repaint manager.
Method Summary
BufferedImagegetOffScreen()
Returns the renderer's offscreen, i.e., the current state as rendered by the associated renderer.
voidsetupRenderer(AffineTransform u2d, boolean dbr, Shape aoi, int width, int height)
Sets up the renderer so that it is ready to render for the new 'context' defined by the user to device transform, double buffering state, area of interest and width/height.
CollectionupdateRendering(Collection areas)
Updates the rendering buffer.

Field Detail

renderer

protected ImageRenderer renderer
The renderer used to repaint the buffer.

Constructor Detail

RepaintManager

public RepaintManager(ImageRenderer r)
Creates a new repaint manager.

Method Detail

getOffScreen

public BufferedImage getOffScreen()
Returns the renderer's offscreen, i.e., the current state as rendered by the associated renderer.

setupRenderer

public void setupRenderer(AffineTransform u2d, boolean dbr, Shape aoi, int width, int height)
Sets up the renderer so that it is ready to render for the new 'context' defined by the user to device transform, double buffering state, area of interest and width/height.

Parameters: u2d The user to device transform. dbr Whether the double buffering should be used. aoi The area of interest in the renderer space units. width The offscreen buffer width. height The offscreen buffer width.

updateRendering

public Collection updateRendering(Collection areas)
Updates the rendering buffer.

Parameters: areas The areas of interest in renderer space units.

Returns: the list of the rectangles to repaint.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.