edu.uci.ics.jung.visualization.jai
Class PerspectiveTransformer
java.lang.Object
edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
edu.uci.ics.jung.visualization.jai.PerspectiveTransformer
- All Implemented Interfaces:
- BidirectionalTransformer, MutableTransformer, ShapeTransformer, ChangeEventSupport
- Direct Known Subclasses:
- PerspectiveShapeTransformer
public class PerspectiveTransformer
- extends MutableTransformerDecorator
- implements MutableTransformer
PerspectiveTransformer wraps a MutableAffineTransformer and modifies
the transform and inverseTransform methods so that they create a
perspective projection of the graph points.
- Author:
- Tom Nelson
Constructor Summary |
PerspectiveTransformer(javax.media.jai.PerspectiveTransform perspectiveTransform)
create an instance, setting values from the passed component
and registering to listen for size changes on the component |
PerspectiveTransformer(javax.media.jai.PerspectiveTransform perspectiveTransform,
MutableTransformer delegate)
create an instance with a possibly shared transform |
Methods inherited from class edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator |
addChangeListener, concatenate, fireStateChanged, getChangeListeners, getDelegate, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, inverseTransform, preConcatenate, removeChangeListener, rotate, rotate, scale, setDelegate, setScale, setTranslate, shear, transform, translate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.uci.ics.jung.visualization.transform.MutableTransformer |
concatenate, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, preConcatenate, rotate, rotate, scale, setScale, setTranslate, shear, translate |
perspectiveTransform
protected javax.media.jai.PerspectiveTransform perspectiveTransform
PerspectiveTransformer
public PerspectiveTransformer(javax.media.jai.PerspectiveTransform perspectiveTransform)
- create an instance, setting values from the passed component
and registering to listen for size changes on the component
- Parameters:
component
-
PerspectiveTransformer
public PerspectiveTransformer(javax.media.jai.PerspectiveTransform perspectiveTransform,
MutableTransformer delegate)
- create an instance with a possibly shared transform
- Parameters:
component
- delegate
-
setToIdentity
public void setToIdentity()
- Specified by:
setToIdentity
in interface MutableTransformer
- Overrides:
setToIdentity
in class MutableTransformerDecorator
createInverse
public javax.media.jai.PerspectiveTransform createInverse()
transform
public Point2D transform(Point2D graphPoint)
- override base class transform to project the perspective effect
- Specified by:
transform
in interface BidirectionalTransformer
- Overrides:
transform
in class MutableTransformerDecorator
- Parameters:
graphPoint
- graph point to convert
- Returns:
- screen point
inverseTransform
public Point2D inverseTransform(Point2D viewPoint)
- override base class to un-project the perspective effect
- Specified by:
inverseTransform
in interface BidirectionalTransformer
- Overrides:
inverseTransform
in class MutableTransformerDecorator
- Parameters:
viewPoint
- screen point to convert
- Returns:
- the graph point
perspectiveTransform
public Point2D perspectiveTransform(Point2D graphPoint)
inversePerspectiveTransform
public Point2D inversePerspectiveTransform(Point2D viewPoint)
- override base class to un-project the perspective effect
getPerspectiveTransform
public javax.media.jai.PerspectiveTransform getPerspectiveTransform()
setPerspectiveTransform
public void setPerspectiveTransform(javax.media.jai.PerspectiveTransform perspectiveTransform)
Copyright © 2009. All Rights Reserved.