|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.TransformContext
public class TransformContext
A transform context defines a transformed coordinate system. Each transform context is associated with a component in the display tree. This class provides the support for most of the transform-related operations on the display tree.
Yellow |
Field Summary | |
---|---|
private boolean |
_cacheValid
A flag saying whether the cached data is valid. |
private CanvasComponent |
_component
The component associated with this context |
private java.awt.geom.AffineTransform |
_graphicsTransform
The temporary graphics context transform |
private java.awt.geom.AffineTransform |
_inverseTransform
The transform from the parent context to this context |
private java.awt.geom.AffineTransform |
_screenTransform
The cached local-to-screen coordinate transform |
private java.awt.geom.AffineTransform |
_transform
The main transform, which is from this context to the parent context |
private int |
_version
The version number |
Constructor Summary | |
---|---|
TransformContext(CanvasComponent component)
Create a transform context associated with the given display component. |
Method Summary | |
---|---|
void |
checkCacheValid(TransformContext ancestor)
Check transform cache validity. |
void |
concatenate(java.awt.geom.AffineTransform at)
Concatenate this transform context with the given transform. |
CanvasComponent |
getComponent()
Get the component that this context is associated with. |
java.awt.geom.AffineTransform |
getInverseTransform()
Get the transform from parent coordinates into local coordinates. |
TransformContext |
getParent()
Get the parent transform context of this one, or null if this context is at the root of the transform tree. |
java.awt.geom.AffineTransform |
getScreenTransform()
Get the transform from local coordinates into screen coordinates. |
java.awt.geom.AffineTransform |
getTransform()
Get the transform of this context. |
java.awt.geom.AffineTransform |
getTransform(TransformContext context)
Get the transform of this context, relative to the given context. |
int |
getVersion()
Get the version number of the transform context. |
void |
invalidateCache()
Notify that cached data based on the transform is now invalid. |
boolean |
isCacheValid()
Test if the cache is valid. |
void |
pop(java.awt.Graphics2D g)
Pop this transform off the graphics stack. |
void |
preConcatenate(java.awt.geom.AffineTransform at)
Pre-concatenate this transform context with the given transform. |
void |
push(java.awt.Graphics2D g)
Push this transform onto the graphics stack. |
void |
setTransform(java.awt.geom.AffineTransform at)
Set the transform that maps local coordinates into the parent's coordinates. |
void |
translate(double x,
double y)
Translate this context the given distance. |
private void |
validateCache()
Recompute the cached transforms. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean _cacheValid
private int _version
private CanvasComponent _component
private java.awt.geom.AffineTransform _graphicsTransform
private java.awt.geom.AffineTransform _transform
private java.awt.geom.AffineTransform _inverseTransform
private java.awt.geom.AffineTransform _screenTransform
Constructor Detail |
---|
public TransformContext(CanvasComponent component)
Method Detail |
---|
public void checkCacheValid(TransformContext ancestor)
public void concatenate(java.awt.geom.AffineTransform at)
public CanvasComponent getComponent()
public java.awt.geom.AffineTransform getInverseTransform()
public TransformContext getParent()
public java.awt.geom.AffineTransform getScreenTransform()
public java.awt.geom.AffineTransform getTransform()
public java.awt.geom.AffineTransform getTransform(TransformContext context)
public int getVersion()
public void invalidateCache()
public boolean isCacheValid()
public void push(java.awt.Graphics2D g)
public void pop(java.awt.Graphics2D g)
public void preConcatenate(java.awt.geom.AffineTransform at)
public void setTransform(java.awt.geom.AffineTransform at)
public void translate(double x, double y)
private void validateCache()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |