org.freedesktop.cairo
Class Matrix
Struct
org.freedesktop.cairo.CairoObject
org.freedesktop.cairo.Matrix
public class Matrix
extends org.freedesktop.cairo.CairoObject
TODO: error handling
getX0
public double getX0()
getXX
public double getXX()
getXY
public double getXY()
getY0
public double getY0()
getYX
public double getYX()
getYY
public double getYY()
invert
public void invert()
Inverts this matrix.
multiply
public static Matrix multiply(Matrix a,
Matrix b)
Multiplies 2 matrices and returns the result.
a
- first matrixb
- second matrix
- The product
rotate
public void rotate(double radians)
Appends rotation transformation to this matrix.
radians
- The rotation angle in radians.
scale
public void scale(double sx,
double sy)
Appends non-uniform scaling to this matrix.
sx
- X axis scaling factorsy
- Y axis scaling factor
setX0
public void setX0(double x0)
setXX
public void setXX(double xx)
setXY
public void setXY(double xy)
setY0
public void setY0(double y0)
setYX
public void setYX(double yx)
setYY
public void setYY(double yy)
transformDistance
public Point transformDistance(Point distance)
Transforms the given distance and returns transformed co-ordinates
transformPoint
public Point transformPoint(Point point)
Transforms the given point and returns transformed co-ordinates
translate
public void translate(double tx,
double ty)
Appends a transaltion transformation to this matrix.
tx
- X axis translationty
- Y axis translation