|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.jazz.util.ZRenderContext
ZRenderContext stores information relevant to the current render as it occurs. The render context is available to objects when they are rendered, and the objects can use this information to change the way they render themselves.
Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.
ZCamera
, Serialized FormConstructor Summary | |
ZRenderContext(java.awt.Graphics2D aG2,
ZBounds visibleBounds,
ZDrawingSurface aSurface,
int qualityRequested)
Constructs a new ZRenderContext. |
|
ZRenderContext(ZCamera camera)
Constructs a simple ZRenderContext. |
Method Summary | |
boolean |
getAccurateSpacing()
Determine if strings should be rendered with accurate (but slower) character spacing. |
double |
getCameraMagnification()
Returns the magnification of the current camera being rendered within. |
java.awt.geom.AffineTransform |
getCameraTransform()
Get the transform the current camera was given before it started rendering itself. |
double |
getCompositeMagnification()
Returns the total current magnification that is currently being used for rendering. |
ZDrawingSurface |
getDrawingSurface()
Get the drawing surface being rendered onto. |
java.awt.Graphics2D |
getGraphics2D()
Get the graphics used for this render. |
boolean |
getGreekText()
Determine if text should be rendered "greeked" |
ZCamera |
getRenderingCamera()
Get the current camera being rendered within. |
ZBounds |
getVisibleBounds()
Get the visible bounds of the current render in the local coordinate system. |
void |
popCamera()
Remove a rendering camera |
void |
popVisibleBounds()
Remove a visible bounds from the render context. |
void |
pushCamera(ZCamera camera)
Add a rendering camera |
void |
pushVisibleBounds(ZBounds bounds)
Add a visible bounds to the render context. |
void |
setAccurateSpacing(boolean b)
Specify if strings should be rendered one character at a time with slower, but more accurate spacing. |
void |
setGreekText(boolean b)
Specify if strings should be rendered as "greek" blobs rather than actual text. |
protected void |
setRenderingHints(java.awt.Graphics2D g2,
int quality)
Sets the rendering hints of the specified graphics to either or high or low. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZRenderContext(ZCamera camera)
camera
- The camerapublic ZRenderContext(java.awt.Graphics2D aG2, ZBounds visibleBounds, ZDrawingSurface aSurface, int qualityRequested)
aG2
- The graphics for this rendervisibleBounds
- The bounds being rendered in screen coordinatesaSurface
- The surface being rendered ontoqualityRequested
- The quality to render withMethod Detail |
public java.awt.Graphics2D getGraphics2D()
public void pushVisibleBounds(ZBounds bounds)
bounds
- the new bounds.public void popVisibleBounds()
public ZBounds getVisibleBounds()
public ZDrawingSurface getDrawingSurface()
public void setAccurateSpacing(boolean b)
b
- True turns on accurate spacing, false turns it off.public boolean getAccurateSpacing()
public void setGreekText(boolean b)
b
- True turns on greek text.public boolean getGreekText()
protected void setRenderingHints(java.awt.Graphics2D g2, int quality)
public ZCamera getRenderingCamera()
public java.awt.geom.AffineTransform getCameraTransform()
public void pushCamera(ZCamera camera)
camera
- The camerapublic void popCamera()
public double getCameraMagnification()
getCompositeMagnification()
public double getCompositeMagnification()
getCameraMagnification()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |