public class AffineTransformer extends Object implements BidirectionalTransformer, ShapeTransformer
| Modifier and Type | Field and Description |
|---|---|
protected AffineTransform |
inverse |
protected AffineTransform |
transform
The AffineTransform to use; initialized to identity.
|
| 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() |
double |
getScaleY() |
double |
getShearX() |
double |
getShearY() |
AffineTransform |
getTransform() |
double |
getTranslateX() |
double |
getTranslateY() |
Point2D |
inverseTransform(Point2D p)
applies the inverse transform to the supplied point
|
Shape |
inverseTransform(Shape shape)
Transform the supplied shape from screen (view) to graph (layout) 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 (layout) to screen (view) coordinates.
|
protected AffineTransform inverse
protected AffineTransform transform
public AffineTransformer()
public AffineTransformer(AffineTransform transform)
transform - the transform to usepublic AffineTransform getTransform()
public void setTransform(AffineTransform transform)
transform - The transform to set.public Point2D inverseTransform(Point2D p)
inverseTransform in interface BidirectionalTransformerp - the point to transformpublic 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 - the point to be transformedpublic Shape transform(Shape shape)
transform in interface ShapeTransformershape - the Shape to transformpublic Shape inverseTransform(Shape shape)
inverseTransform in interface ShapeTransformerpublic double getRotation()
Copyright © 2016. All rights reserved.