|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.gvt.renderer.StaticRenderer
Simple implementation of the Renderer that simply does static rendering in an offscreen buffer image.
Field Summary | |
protected WritableRaster |
currentBaseRaster
Offscreen image where the Renderer does its rendering |
protected BufferedImage |
currentOffScreen
|
protected WritableRaster |
currentRaster
|
protected static RenderingHints |
defaultRenderingHints
|
protected boolean |
isDoubleBuffered
Flag for double buffering. |
protected SoftReference |
lastCache
|
protected SoftReference |
lastCR
|
protected int |
offScreenHeight
|
protected int |
offScreenWidth
|
protected RenderingHints |
renderingHints
Passed to the GVT tree to describe the rendering environment |
protected CachableRed |
rootCR
|
protected Filter |
rootFilter
|
protected GraphicsNode |
rootGN
Tree this Renderer paints. |
protected AffineTransform |
usr2dev
|
protected WritableRaster |
workingBaseRaster
|
protected BufferedImage |
workingOffScreen
|
protected WritableRaster |
workingRaster
|
Constructor Summary | |
StaticRenderer()
Creates a new StaticRenderer object. |
|
StaticRenderer(RenderingHints rh,
AffineTransform at)
|
Method Summary | |
void |
clearOffScreen()
Sets up and clears the current offscreen buffer. |
void |
dispose()
Disposes all resources of this renderer. |
void |
flush()
Flush any cached image data. |
void |
flush(Collection areas)
Flush a list of rectangles of cached image data. |
void |
flush(Rectangle r)
Flush a rectangle of cached image data. |
BufferedImage |
getOffScreen()
Returns the current offscreen image. |
RenderingHints |
getRenderingHints()
|
AffineTransform |
getTransform()
Returns a copy of the transform from the current user space (as defined by the top node of the GVT tree) to the device space (1 unit = 1/72nd of an inch / 1 pixel, roughly speaking |
GraphicsNode |
getTree()
Returns the GVT tree associated with this renderer |
boolean |
isDoubleBuffered()
Returns true if the Renderer is currently doubleBuffering is rendering requests. |
protected CachableRed |
renderGNR()
|
void |
repaint(RectListManager areas)
Repaints the associated GVT tree under the list of areas. |
void |
repaint(Shape area)
Repaints the associated GVT tree under area. |
void |
setDoubleBuffered(boolean isDoubleBuffered)
Turns on/off double buffering in renderer. |
void |
setRenderingHints(RenderingHints rh)
|
void |
setTransform(AffineTransform usr2dev)
Sets the transform from the current user space (as defined by the top node of the GVT tree, to the associated device space. |
void |
setTree(GraphicsNode rootGN)
This associates the given GVT Tree with this renderer. |
protected CachableRed |
setupCache(CachableRed img)
|
void |
updateOffScreen(int width,
int height)
Update the size of the image to be returned by getOffScreen. |
protected void |
updateWorkingBuffers()
Internal method used to synchronize local state in response to various set methods. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected GraphicsNode rootGN
protected Filter rootFilter
protected CachableRed rootCR
protected SoftReference lastCR
protected SoftReference lastCache
protected boolean isDoubleBuffered
protected WritableRaster currentBaseRaster
protected WritableRaster currentRaster
protected BufferedImage currentOffScreen
protected WritableRaster workingBaseRaster
protected WritableRaster workingRaster
protected BufferedImage workingOffScreen
protected int offScreenWidth
protected int offScreenHeight
protected RenderingHints renderingHints
protected AffineTransform usr2dev
protected static RenderingHints defaultRenderingHints
Constructor Detail |
public StaticRenderer(RenderingHints rh, AffineTransform at)
rh
- Hints for rendering.at
- Starting user to device coordinate system transform.public StaticRenderer()
Method Detail |
public void dispose()
dispose
in interface Renderer
public void setTree(GraphicsNode rootGN)
setTree
in interface Renderer
public GraphicsNode getTree()
Renderer
getTree
in interface Renderer
public void setRenderingHints(RenderingHints rh)
rh
- Set of rendering hints to use for future renderingspublic RenderingHints getRenderingHints()
public void setTransform(AffineTransform usr2dev)
setTransform
in interface Renderer
usr2dev
- the new user space to device space transform. If null,
the identity transform will be set.public AffineTransform getTransform()
getTransform
in interface Renderer
public boolean isDoubleBuffered()
isDoubleBuffered
in interface Renderer
public void setDoubleBuffered(boolean isDoubleBuffered)
setDoubleBuffered
in interface Renderer
isDoubleBuffered
- the new value for double bufferingpublic void updateOffScreen(int width, int height)
updateOffScreen
in interface ImageRenderer
public BufferedImage getOffScreen()
getOffScreen
in interface ImageRenderer
public void clearOffScreen()
clearOffScreen
in interface ImageRenderer
public void repaint(Shape area)
repaint
in interface Renderer
area
- region to be repainted, in the current user space
coordinate system.public void repaint(RectListManager areas)
repaint
in interface Renderer
areas
- a List of regions to be repainted, in the current
user space coordinate system.public void flush()
flush
in interface ImageRenderer
public void flush(Collection areas)
flush
in interface ImageRenderer
public void flush(Rectangle r)
flush
in interface ImageRenderer
protected CachableRed setupCache(CachableRed img)
protected CachableRed renderGNR()
protected void updateWorkingBuffers()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |