|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.gvt.renderer.MacRenderer
public class MacRenderer
Simple implementation of the Renderer that supports dynamic updates.
| Field Summary | |
|---|---|
protected BufferedImage |
currImg
|
protected RectListManager |
damagedAreas
|
protected static RenderingHints |
defaultRenderingHints
|
static int |
IMAGE_TYPE
|
protected boolean |
isDoubleBuffered
|
protected int |
offScreenHeight
|
protected int |
offScreenWidth
|
protected RenderingHints |
renderingHints
|
protected GraphicsNode |
rootGN
|
static Color |
TRANSPARENT_WHITE
|
protected AffineTransform |
usr2dev
|
protected BufferedImage |
workImg
|
| Constructor Summary | |
|---|---|
MacRenderer()
Constructs a new dynamic renderer with the specified buffer image. |
|
MacRenderer(RenderingHints rh,
AffineTransform at)
|
|
| Method Summary | |
|---|---|
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(Collection areas)
Flush a list of rectangles of cached image data. |
void |
flush(Rectangle r)
Flush a rectangle of cached image data (preliminary interface). |
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. |
void |
repaint(RectListManager devRLM)
Repaints the associated GVT tree under the list of areas. |
void |
repaint(Shape area)
Repaints the associated GVT tree at least 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 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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RenderingHints renderingHints
protected AffineTransform usr2dev
protected GraphicsNode rootGN
protected int offScreenWidth
protected int offScreenHeight
protected boolean isDoubleBuffered
protected BufferedImage currImg
protected BufferedImage workImg
protected RectListManager damagedAreas
public static int IMAGE_TYPE
public static Color TRANSPARENT_WHITE
protected static RenderingHints defaultRenderingHints
| Constructor Detail |
|---|
public MacRenderer()
public MacRenderer(RenderingHints rh,
AffineTransform at)
| Method Detail |
|---|
public void dispose()
ImageRenderer
dispose in interface ImageRendererdispose in interface Rendererpublic void setTree(GraphicsNode treeRoot)
setTree in interface Rendererpublic GraphicsNode getTree()
getTree in interface Rendererpublic 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 void setRenderingHints(RenderingHints rh)
ImageRenderer
setRenderingHints in interface ImageRendererrh - Set of rendering hints to use for future renderingspublic RenderingHints getRenderingHints()
ImageRenderer
getRenderingHints in interface ImageRendererpublic boolean isDoubleBuffered()
isDoubleBuffered in interface Rendererpublic void setDoubleBuffered(boolean isDoubleBuffered)
setDoubleBuffered in interface RendererisDoubleBuffered - the new value for double buffering
public void updateOffScreen(int width,
int height)
updateOffScreen in interface ImageRendererpublic BufferedImage getOffScreen()
getOffScreen in interface ImageRendererpublic void clearOffScreen()
clearOffScreen in interface ImageRendererpublic void flush()
ImageRenderer
flush in interface ImageRendererpublic void flush(Rectangle r)
ImageRenderer
flush in interface ImageRendererpublic void flush(Collection areas)
flush in interface ImageRendererprotected void updateWorkingBuffers()
public void repaint(Shape area)
Rendererarea.
repaint in interface Rendererarea - the region to be repainted, in the current user
space coordinate system.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.
repaint in interface RendererdevRLM - regions to be repainted, in the current
user space coordinate system.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||