edu.umd.cs.piccolo.util
Class PAffineTransform

java.lang.Object
  extended by java.awt.geom.AffineTransform
      extended by edu.umd.cs.piccolo.util.PAffineTransform
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class PAffineTransform
extends java.awt.geom.AffineTransform

PAffineTransform is a subclass of AffineTransform that has been extended with convenience methods.

Version:
1.0
Author:
Jesse Grosjean
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.geom.AffineTransform
TYPE_FLIP, TYPE_GENERAL_ROTATION, TYPE_GENERAL_SCALE, TYPE_GENERAL_TRANSFORM, TYPE_IDENTITY, TYPE_MASK_ROTATION, TYPE_MASK_SCALE, TYPE_QUADRANT_ROTATION, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE
 
Constructor Summary
PAffineTransform()
           
PAffineTransform(java.awt.geom.AffineTransform tx)
           
PAffineTransform(double[] flatmatrix)
           
PAffineTransform(double m00, double m10, double m01, double m11, double m02, double m12)
           
PAffineTransform(float[] flatmatrix)
           
PAffineTransform(float m00, float m10, float m01, float m11, float m02, float m12)
           
 
Method Summary
 double getRotation()
          Returns the rotation applied to this affine transform in radians.
 double getScale()
           
 java.awt.geom.Dimension2D inverseTransform(java.awt.geom.Dimension2D dimSrc, java.awt.geom.Dimension2D dimDst)
           
 java.awt.geom.Rectangle2D inverseTransform(java.awt.geom.Rectangle2D rectSrc, java.awt.geom.Rectangle2D rectDst)
           
 void scaleAboutPoint(double scale, double x, double y)
           
 void setOffset(double tx, double ty)
           
 void setRotation(double theta)
          Set rotation in radians.
 void setScale(double scale)
           
 java.awt.geom.Dimension2D transform(java.awt.geom.Dimension2D dimSrc, java.awt.geom.Dimension2D dimDst)
           
 java.awt.geom.Rectangle2D transform(java.awt.geom.Rectangle2D rectSrc, java.awt.geom.Rectangle2D rectDst)
           
 
Methods inherited from class java.awt.geom.AffineTransform
clone, concatenate, createInverse, createTransformedShape, deltaTransform, deltaTransform, equals, getDeterminant, getMatrix, getRotateInstance, getRotateInstance, getScaleInstance, getScaleX, getScaleY, getShearInstance, getShearX, getShearY, getTranslateInstance, getTranslateX, getTranslateY, getType, hashCode, inverseTransform, inverseTransform, isIdentity, preConcatenate, rotate, rotate, scale, setToIdentity, setToRotation, setToRotation, setToScale, setToShear, setToTranslation, setTransform, setTransform, shear, toString, transform, transform, transform, transform, transform, transform, translate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PAffineTransform

public PAffineTransform()

PAffineTransform

public PAffineTransform(double[] flatmatrix)

PAffineTransform

public PAffineTransform(float[] flatmatrix)

PAffineTransform

public PAffineTransform(double m00,
                        double m10,
                        double m01,
                        double m11,
                        double m02,
                        double m12)

PAffineTransform

public PAffineTransform(float m00,
                        float m10,
                        float m01,
                        float m11,
                        float m02,
                        float m12)

PAffineTransform

public PAffineTransform(java.awt.geom.AffineTransform tx)
Method Detail

scaleAboutPoint

public void scaleAboutPoint(double scale,
                            double x,
                            double y)

getScale

public double getScale()

setScale

public void setScale(double scale)

setOffset

public void setOffset(double tx,
                      double ty)

getRotation

public double getRotation()
Returns the rotation applied to this affine transform in radians. The value returned will be between 0 and 2pi.

Returns:
rotation in radians

setRotation

public void setRotation(double theta)
Set rotation in radians.


transform

public java.awt.geom.Dimension2D transform(java.awt.geom.Dimension2D dimSrc,
                                           java.awt.geom.Dimension2D dimDst)

inverseTransform

public java.awt.geom.Dimension2D inverseTransform(java.awt.geom.Dimension2D dimSrc,
                                                  java.awt.geom.Dimension2D dimDst)

transform

public java.awt.geom.Rectangle2D transform(java.awt.geom.Rectangle2D rectSrc,
                                           java.awt.geom.Rectangle2D rectDst)

inverseTransform

public java.awt.geom.Rectangle2D inverseTransform(java.awt.geom.Rectangle2D rectSrc,
                                                  java.awt.geom.Rectangle2D rectDst)


Copyright 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility