public class MacRenderer extends java.lang.Object implements ImageRenderer
Modifier and Type | Field and Description |
---|---|
protected java.awt.image.BufferedImage |
currImg |
protected RectListManager |
damagedAreas |
protected static java.awt.RenderingHints |
defaultRenderingHints |
static int |
IMAGE_TYPE |
protected boolean |
isDoubleBuffered |
protected int |
offScreenHeight |
protected int |
offScreenWidth |
protected java.awt.RenderingHints |
renderingHints |
protected GraphicsNode |
rootGN |
static java.awt.Color |
TRANSPARENT_WHITE |
protected java.awt.geom.AffineTransform |
usr2dev |
protected java.awt.image.BufferedImage |
workImg |
Constructor and Description |
---|
MacRenderer()
Constructs a new dynamic renderer with the specified buffer image.
|
MacRenderer(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()
release resources associated with this object.
|
void |
flush()
Flush any cached image data (preliminary interface).
|
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 (preliminary interface).
|
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.
|
void |
repaint(RectListManager devRLM)
Repaints the associated GVT tree under the list of
areas . |
void |
repaint(java.awt.Shape area)
Repaints the associated GVT tree at least 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 treeRoot)
This associates the given GVT Tree with this renderer.
|
void |
updateOffScreen(int width,
int height)
Update the size of the image to be returned by getOffScreen.
|
protected void |
updateWorkingBuffers() |
protected java.awt.RenderingHints renderingHints
protected java.awt.geom.AffineTransform usr2dev
protected GraphicsNode rootGN
protected int offScreenWidth
protected int offScreenHeight
protected boolean isDoubleBuffered
protected java.awt.image.BufferedImage currImg
protected java.awt.image.BufferedImage workImg
protected RectListManager damagedAreas
public static int IMAGE_TYPE
public static java.awt.Color TRANSPARENT_WHITE
protected static java.awt.RenderingHints defaultRenderingHints
public MacRenderer()
public MacRenderer(java.awt.RenderingHints rh, java.awt.geom.AffineTransform at)
public void dispose()
ImageRenderer
dispose
in interface ImageRenderer
dispose
in interface Renderer
public void setTree(GraphicsNode treeRoot)
public GraphicsNode getTree()
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 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 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 flush()
ImageRenderer
flush
in interface ImageRenderer
public void flush(java.awt.Rectangle r)
ImageRenderer
flush
in interface ImageRenderer
public void flush(java.util.Collection areas)
flush
in interface ImageRenderer
protected void updateWorkingBuffers()
public void repaint(java.awt.Shape area)
Renderer
area
.public void repaint(RectListManager devRLM)
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.Copyright © 2022 Apache Software Foundation. All Rights Reserved.