public class StaticRenderer extends java.lang.Object implements ImageRenderer
Modifier and Type | Field and Description |
---|---|
protected java.awt.image.WritableRaster |
currentBaseRaster
Offscreen image where the Renderer does its rendering
|
protected java.awt.image.BufferedImage |
currentOffScreen |
protected java.awt.image.WritableRaster |
currentRaster |
protected static java.awt.RenderingHints |
defaultRenderingHints |
protected boolean |
isDoubleBuffered
Flag for double buffering.
|
protected java.lang.ref.SoftReference |
lastCache |
protected java.lang.ref.SoftReference |
lastCR |
protected int |
offScreenHeight |
protected int |
offScreenWidth |
protected java.awt.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 java.awt.geom.AffineTransform |
usr2dev |
protected java.awt.image.WritableRaster |
workingBaseRaster |
protected java.awt.image.BufferedImage |
workingOffScreen |
protected java.awt.image.WritableRaster |
workingRaster |
Constructor and Description |
---|
StaticRenderer()
Creates a new StaticRenderer object.
|
StaticRenderer(java.awt.RenderingHints rh,
java.awt.geom.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(java.util.Collection areas)
Flush a list of rectangles of cached image data.
|
void |
flush(java.awt.Rectangle r)
Flush a rectangle of cached image data.
|
java.awt.image.BufferedImage |
getOffScreen()
Returns the current offscreen image.
|
java.awt.RenderingHints |
getRenderingHints()
Returns the rendering hints this ImageRenderer is using for its
rendering.
|
java.awt.geom.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(java.awt.Shape area)
Repaints the associated GVT tree under
area . |
void |
setDoubleBuffered(boolean isDoubleBuffered)
Turns on/off double buffering in renderer.
|
void |
setRenderingHints(java.awt.RenderingHints rh)
Sets the specified rendering hints to be used for future renderings.
|
void |
setTransform(java.awt.geom.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 java.lang.ref.SoftReference lastCR
protected java.lang.ref.SoftReference lastCache
protected boolean isDoubleBuffered
protected java.awt.image.WritableRaster currentBaseRaster
protected java.awt.image.WritableRaster currentRaster
protected java.awt.image.BufferedImage currentOffScreen
protected java.awt.image.WritableRaster workingBaseRaster
protected java.awt.image.WritableRaster workingRaster
protected java.awt.image.BufferedImage workingOffScreen
protected int offScreenWidth
protected int offScreenHeight
protected java.awt.RenderingHints renderingHints
protected java.awt.geom.AffineTransform usr2dev
protected static java.awt.RenderingHints defaultRenderingHints
public StaticRenderer(java.awt.RenderingHints rh, java.awt.geom.AffineTransform at)
rh
- Hints for rendering.at
- Starting user to device coordinate system transform.public StaticRenderer()
public void dispose()
dispose
in interface ImageRenderer
dispose
in interface Renderer
public void setTree(GraphicsNode rootGN)
public GraphicsNode getTree()
Renderer
public void setRenderingHints(java.awt.RenderingHints rh)
ImageRenderer
setRenderingHints
in interface ImageRenderer
rh
- Set of rendering hints to use for future renderingspublic java.awt.RenderingHints getRenderingHints()
ImageRenderer
getRenderingHints
in interface ImageRenderer
public void setTransform(java.awt.geom.AffineTransform usr2dev)
setTransform
in interface ImageRenderer
setTransform
in interface Renderer
usr2dev
- the new user space to device space transform. If null,
the identity transform will be set.public java.awt.geom.AffineTransform getTransform()
getTransform
in interface ImageRenderer
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 java.awt.image.BufferedImage getOffScreen()
getOffScreen
in interface ImageRenderer
public void clearOffScreen()
clearOffScreen
in interface ImageRenderer
public void repaint(java.awt.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 ImageRenderer
public void flush(java.util.Collection areas)
flush
in interface ImageRenderer
public void flush(java.awt.Rectangle r)
flush
in interface ImageRenderer
protected CachableRed setupCache(CachableRed img)
protected CachableRed renderGNR()
protected void updateWorkingBuffers()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.