public class AffineTransformer extends Object implements BidirectionalTransformer, ShapeTransformer
| Modifier and Type | Field and Description |
|---|---|
protected AffineTransform |
inverse |
protected AffineTransform |
transform
the AffineTransform to use.
|
| Constructor and Description |
|---|
AffineTransformer()
create an instance that does not transform points
|
AffineTransformer(AffineTransform transform)
Create an instance with the supplied transform
|
| Modifier and Type | Method and Description |
|---|---|
AffineTransform |
getInverse() |
double |
getRotation() |
double |
getScale() |
double |
getScaleX()
getter for scalex
|
double |
getScaleY()
getter for scaley
|
double |
getShearX()
getter for shear in x axis
|
double |
getShearY()
getter for shear in y axis
|
AffineTransform |
getTransform() |
double |
getTranslateX()
get the translate x value
|
double |
getTranslateY()
get the translate y value
|
Point2D |
inverseTransform(Point2D p)
applies the inverse transform to the supplied point
|
Shape |
inverseTransform(Shape shape)
transform the supplied shape from graph coordinates to
screen coordinates
|
void |
setTransform(AffineTransform transform) |
String |
toString() |
Point2D |
transform(Point2D p)
applies the transform to the supplied point
|
Shape |
transform(Shape shape)
transform the supplied shape from graph coordinates to
screen coordinates
|
protected AffineTransform inverse
protected AffineTransform transform
public AffineTransformer()
public AffineTransformer(AffineTransform transform)
public AffineTransform getTransform()
public void setTransform(AffineTransform transform)
transform - The transform to set.public Point2D inverseTransform(Point2D p)
inverseTransform in interface BidirectionalTransformerp - public AffineTransform getInverse()
public double getScaleX()
public double getScaleY()
public double getScale()
public double getShearX()
public double getShearY()
public double getTranslateX()
public double getTranslateY()
public Point2D transform(Point2D p)
transform in interface BidirectionalTransformerp - graph point to convertpublic Shape transform(Shape shape)
transform in interface BidirectionalTransformertransform in interface ShapeTransformerpublic Shape inverseTransform(Shape shape)
inverseTransform in interface BidirectionalTransformerinverseTransform in interface ShapeTransformerpublic double getRotation()
Copyright © 2015. All rights reserved.