public class StaticRenderer extends Object implements ImageRenderer
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
StaticRenderer()
Creates a new StaticRenderer object.
|
StaticRenderer(RenderingHints rh,
AffineTransform at) |
| Modifier and Type | Method and Description |
|---|---|
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()
Returns the rendering hints this ImageRenderer is using for its
rendering.
|
AffineTransform |
getTransform()
Returns the transform from the current user space (as defined
by the top node of the GVT tree) to the device space.
|
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)
Sets the specified rendering hints to be used for future renderings.
|
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.
|
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
public StaticRenderer(RenderingHints rh, AffineTransform at)
rh - Hints for rendering.at - Starting user to device coordinate system transform.public StaticRenderer()
public void dispose()
dispose in interface ImageRendererdispose in interface Rendererpublic void setTree(GraphicsNode rootGN)
public GraphicsNode getTree()
Rendererpublic void setRenderingHints(RenderingHints rh)
ImageRenderersetRenderingHints in interface ImageRendererrh - Set of rendering hints to use for future renderingspublic RenderingHints getRenderingHints()
ImageRenderergetRenderingHints in interface ImageRendererpublic void setTransform(AffineTransform usr2dev)
setTransform in interface ImageRenderersetTransform in interface Rendererusr2dev - the new user space to device space transform. If null,
the identity transform will be set.public AffineTransform getTransform()
getTransform in interface ImageRenderergetTransform in interface Rendererpublic boolean isDoubleBuffered()
isDoubleBuffered in interface Rendererpublic void setDoubleBuffered(boolean isDoubleBuffered)
setDoubleBuffered in interface RendererisDoubleBuffered - the new value for double bufferingpublic void updateOffScreen(int width,
int height)
updateOffScreen in interface ImageRendererpublic BufferedImage getOffScreen()
getOffScreen in interface ImageRendererpublic void clearOffScreen()
clearOffScreen in interface ImageRendererpublic void repaint(Shape area)
area.
If double buffered is true and this method completes cleanly it
will set the result of the repaint as the image returned by
getOffscreen otherwise the old image will still be returned.
If double buffered is false it is possible some effects of
the failed rendering will be visible in the image returned
by getOffscreen.public void repaint(RectListManager areas)
areas.
If double buffered is true and this method completes cleanly it
will set the result of the repaint as the image returned by
getOffscreen otherwise the old image will still be returned.
If double buffered is false it is possible some effects of
the failed rendering will be visible in the image returned
by getOffscreen.public void flush()
flush in interface ImageRendererpublic void flush(Collection areas)
flush in interface ImageRendererpublic void flush(Rectangle r)
flush in interface ImageRendererprotected CachableRed setupCache(CachableRed img)
protected CachableRed renderGNR()
protected void updateWorkingBuffers()
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.