|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.AbstractXyTransform
com.partnersoft.geometry.xy.XyAffineTransform
public class XyAffineTransform
A vector matrix affine transform.
See the wikipedia page on Affine Transformation for a full discussion.
Putting matrices aside, here is the math:
x1 = x0*scaleX + y0*shearX + translateX y1 = x0*shearY + y0*scaleY + translateY
Copyright 2007 Partner Software, Inc.
| Constructor Summary | |
|---|---|
XyAffineTransform(double scaleX,
double shearX,
double translateX,
double shearY,
double scaleY,
double translateY)
Tedious full constructor. |
|
| Method Summary | |
|---|---|
static XyAffineTransform |
forIdentity()
Returns the identity transform. |
static XyAffineTransform |
forRotation(XyRotation rotation)
Returns a transformation matrix that will rotate by the given amount. |
static XyAffineTransform |
forRotation(XyRotation rotation,
XyPoint center)
Returns a transformation matrix that will rotate by the given amount around the given center point. |
static XyAffineTransform |
forScaling(double scale)
Returns a transformation matrix that will scale by the given amount in both dimensions. |
static XyAffineTransform |
forScaling(double scaleX,
double scaleY)
Returns a transformation matrix that will scale by the given amount for each dimension. |
static XyAffineTransform |
forTranslation(double deltaX,
double deltaY)
Returns a transformation matrix that will translate by the given amount. |
double |
getScaleX()
The x coordinate scaling element (m00) of the transformation matrix. |
double |
getScaleY()
The y coordinate scaling element (m11) of the transformation matrix. |
double |
getShearX()
The x coordinate shearing element (m01) of the transformation matrix. |
double |
getShearY()
The y coordinate shearing element (m10) of the transformation matrix. |
double |
getTranslateX()
The x coordinate translation element (m02) of the transformation matrix. |
double |
getTranslateY()
The y coordinate translation element (m12) of the transformation matrix. |
boolean |
isIdentity()
True if this is an identity transform. |
XyAffineTransform |
multipliedBy(XyAffineTransform nother)
Does a matrix multiplication and returns the result. |
XyAffineTransform |
rotatedBy(XyRotation rotation)
Rotates the transformation matrix by the given amount and returns the result. |
XyAffineTransform |
rotatedBy(XyRotation rotation,
XyPoint center)
Rotates the transformation matrix by the given amount around the given center and returns the result. |
XyAffineTransform |
scaledBy(double scale)
Scales the transformation matrix by the given amount and returns the result. |
XyAffineTransform |
scaledBy(double scaleX,
double scaleY)
Scales the transformation matrix by the given amount and returns the result. |
protected XyPoint |
transformImp(XyPoint point)
Subclasses must implement this to do the actual work of transformation. |
XyAffineTransform |
translatedBy(double deltaX,
double deltaY)
Translates the transformation matrix by the given amount and returns the result. |
| Methods inherited from class com.partnersoft.geometry.xy.AbstractXyTransform |
|---|
transform, transform, transform |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XyAffineTransform(double scaleX,
double shearX,
double translateX,
double shearY,
double scaleY,
double translateY)
| Method Detail |
|---|
public static XyAffineTransform forIdentity()
public static XyAffineTransform forRotation(XyRotation rotation)
public static XyAffineTransform forRotation(XyRotation rotation,
XyPoint center)
public static XyAffineTransform forTranslation(double deltaX,
double deltaY)
public static XyAffineTransform forScaling(double scale)
public static XyAffineTransform forScaling(double scaleX,
double scaleY)
public XyAffineTransform rotatedBy(XyRotation rotation)
public XyAffineTransform rotatedBy(XyRotation rotation,
XyPoint center)
public XyAffineTransform translatedBy(double deltaX,
double deltaY)
public XyAffineTransform scaledBy(double scaleX,
double scaleY)
public XyAffineTransform scaledBy(double scale)
public XyAffineTransform multipliedBy(XyAffineTransform nother)
protected XyPoint transformImp(XyPoint point)
AbstractXyTransformAbstractXyTransform.transform(XyPoint), except that you
do NOT have to check for identity - that will be done automatically.
transformImp in class AbstractXyTransformpublic boolean isIdentity()
isIdentity in interface XyTransformpublic double getScaleX()
public double getScaleY()
public double getShearX()
public double getShearY()
public double getTranslateX()
public double getTranslateY()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||