nodebox.graphics
Class Transform

java.lang.Object
  extended by nodebox.graphics.Transform
All Implemented Interfaces:
Cloneable

public class Transform
extends Object
implements Cloneable


Nested Class Summary
static class Transform.Mode
           
 
Constructor Summary
Transform()
           
Transform(AffineTransform affineTransform)
           
Transform(double m00, double m10, double m01, double m11, double m02, double m12)
           
Transform(Transform other)
           
 
Method Summary
 void append(Transform t)
           
 void apply(Graphics2D g, Rect bounds)
           
protected  Transform clone()
           
 Rect convertBoundsToFrame(Rect bounds)
           
 boolean equals(Object obj)
           
 AffineTransform getAffineTransform()
           
 boolean invert()
           
 Geometry map(Geometry g)
           
 IGeometry map(IGeometry shape)
           
 List<Point> map(List<Point> points)
          Transform all the given points and return a list of transformed points.
 Path map(Path p)
           
 Point map(Point p)
           
 Rect map(Rect r)
           
 void prepend(Transform t)
           
 void rotate(double degrees)
           
static Transform rotated(double degrees)
           
static Transform rotatedRadians(double radians)
           
 void rotateRadians(double radians)
           
 void scale(double scale)
           
 void scale(double sx, double sy)
           
static Transform scaled(double scale)
           
static Transform scaled(double sx, double sy)
           
static Transform scaled(Point s)
           
 void skew(double skew)
           
 void skew(double kx, double ky)
           
static Transform skewed(double skew)
           
static Transform skewed(double kx, double ky)
           
 void translate(double tx, double ty)
           
 void translate(Point point)
           
static Transform translated(double tx, double ty)
           
static Transform translated(Point t)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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.