edu.uci.ics.jung.visualization.jai
Class PerspectiveShapeTransformer

java.lang.Object
  extended by edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
      extended by edu.uci.ics.jung.visualization.jai.PerspectiveTransformer
          extended by edu.uci.ics.jung.visualization.jai.PerspectiveShapeTransformer
All Implemented Interfaces:
BidirectionalTransformer, MutableTransformer, ShapeTransformer, ChangeEventSupport

public class PerspectiveShapeTransformer
extends PerspectiveTransformer
implements ShapeTransformer

PerspectiveShapeTransformer extends PerspectiveTransformer and adds implementations for methods in ShapeTransformer. It modifies the shapes (Vertex, Edge, and Arrowheads) so that they are distorted by the perspective transformation

Author:
Tom Nelson

Field Summary
 
Fields inherited from class edu.uci.ics.jung.visualization.jai.PerspectiveTransformer
perspectiveTransform
 
Fields inherited from class edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
delegate
 
Constructor Summary
PerspectiveShapeTransformer(javax.media.jai.PerspectiveTransform perspectiveTransform)
          Create an instance, setting values from the passed component and registering to listen for size changes on the component.
PerspectiveShapeTransformer(javax.media.jai.PerspectiveTransform perspectiveTransform, MutableTransformer delegate)
          Create an instance
 
Method Summary
 Shape inversePerspectiveTransform(Shape shape)
           
 Shape inverseTransform(Shape shape)
           
 Shape perspectiveTransform(Shape shape)
           
 Shape perspectiveTransform(Shape shape, float flatness)
           
 Shape transform(Shape shape)
          Transform the supplied shape with the overridden transform method so that the shape is distorted by the perspective transform.
 Shape transform(Shape shape, float flatness)
           
 
Methods inherited from class edu.uci.ics.jung.visualization.jai.PerspectiveTransformer
createInverse, getPerspectiveTransform, inversePerspectiveTransform, inverseTransform, perspectiveTransform, setPerspectiveTransform, setToIdentity, 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, preConcatenate, removeChangeListener, rotate, rotate, scale, setDelegate, setScale, setTranslate, shear, 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.BidirectionalTransformer
inverseTransform, transform
 
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
 
Methods inherited from interface edu.uci.ics.jung.visualization.util.ChangeEventSupport
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener
 

Constructor Detail

PerspectiveShapeTransformer

public PerspectiveShapeTransformer(javax.media.jai.PerspectiveTransform perspectiveTransform)
Create an instance, setting values from the passed component and registering to listen for size changes on the component.


PerspectiveShapeTransformer

public PerspectiveShapeTransformer(javax.media.jai.PerspectiveTransform perspectiveTransform,
                                   MutableTransformer delegate)
Create an instance

Method Detail

transform

public Shape transform(Shape shape)
Transform the supplied shape with the overridden transform method so that the shape is distorted by the perspective transform.

Specified by:
transform in interface BidirectionalTransformer
Specified by:
transform in interface ShapeTransformer
Overrides:
transform in class MutableTransformerDecorator
Parameters:
shape - a shape to transform
Returns:
a GeneralPath for the transformed shape

transform

public Shape transform(Shape shape,
                       float flatness)

inverseTransform

public Shape inverseTransform(Shape shape)
Specified by:
inverseTransform in interface BidirectionalTransformer
Specified by:
inverseTransform in interface ShapeTransformer
Overrides:
inverseTransform in class MutableTransformerDecorator
Returns:

perspectiveTransform

public Shape perspectiveTransform(Shape shape)

perspectiveTransform

public Shape perspectiveTransform(Shape shape,
                                  float flatness)

inversePerspectiveTransform

public Shape inversePerspectiveTransform(Shape shape)


Copyright © 2009. All Rights Reserved.