nodebox.graphics
Class Transform
java.lang.Object
nodebox.graphics.Transform
- All Implemented Interfaces:
- Cloneable
public class Transform
- extends Object
- implements Cloneable
Transform
public Transform()
Transform
public Transform(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
Transform
public Transform(AffineTransform affineTransform)
Transform
public Transform(Transform other)
translated
public static Transform translated(double tx,
double ty)
translated
public static Transform translated(Point t)
rotated
public static Transform rotated(double degrees)
rotatedRadians
public static Transform rotatedRadians(double radians)
scaled
public static Transform scaled(double scale)
scaled
public static Transform scaled(double sx,
double sy)
scaled
public static Transform scaled(Point s)
skewed
public static Transform skewed(double skew)
skewed
public static Transform skewed(double kx,
double ky)
translate
public void translate(Point point)
translate
public void translate(double tx,
double ty)
rotate
public void rotate(double degrees)
rotateRadians
public void rotateRadians(double radians)
scale
public void scale(double scale)
scale
public void scale(double sx,
double sy)
skew
public void skew(double skew)
skew
public void skew(double kx,
double ky)
invert
public boolean invert()
append
public void append(Transform t)
prepend
public void prepend(Transform t)
map
public Point map(Point p)
map
public Rect map(Rect r)
map
public IGeometry map(IGeometry shape)
map
public Path map(Path p)
map
public Geometry map(Geometry g)
map
public List<Point> map(List<Point> points)
- Transform all the given points and return a list of transformed points.
Points are immutable, so they can not be transformed in-place.
- Parameters:
points - The points to transform.
- Returns:
- The list of transformed points.
convertBoundsToFrame
public Rect convertBoundsToFrame(Rect bounds)
clone
protected Transform clone()
- Overrides:
clone in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
apply
public void apply(Graphics2D g,
Rect bounds)
getAffineTransform
public AffineTransform getAffineTransform()
Copyright © 2013. All Rights Reserved.