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 BidirectionalTransformer
p
- 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 BidirectionalTransformer
p
- graph point to convertpublic Shape transform(Shape shape)
transform
in interface BidirectionalTransformer
transform
in interface ShapeTransformer
public Shape inverseTransform(Shape shape)
inverseTransform
in interface BidirectionalTransformer
inverseTransform
in interface ShapeTransformer
public double getRotation()
Copyright © 2015. All rights reserved.