Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
Struct
org.freedesktop.cairo.CairoObject
org.freedesktop.cairo.Matrix
public class Matrix
extends org.freedesktop.cairo.CairoObject
Constructor Summary | |
|
Method Summary | |
double |
|
double |
|
double |
|
double |
|
double |
|
double |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
static Matrix | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Point |
|
Point |
|
void |
|
public Matrix()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Creates a new matrix initialized with a noop transform.
public double getX0()
public double getXX()
public double getXY()
public double getY0()
public double getYX()
public double getYY()
public void init(double xx, double yx, double xy, double yy, double x0, double y0)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Sets the matrix to be the affine transformation given by xx, yx, xy, yy, x0, y0. The transformation is given by:x_new = xx * x + xy * y + x0; y_new = yx * x + yy * y + y0;
public void initIdentity()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Modifies the matrix to be an identity transformation.
public void initRotate(double radians)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Initialized the matrix to a transformation that rotates by
- Parameters:
radians
- angle of rotation, in radians. The direction of rotation is defined such that positive angles rotate in the direction from the positive X axis toward the positive Y axis. With the default axis orientation of cairo, positive angles rotate in a clockwise direction.
public void initScale(double sx, double sy)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Initializes the matrix to a transformation that scales by sx and sy in the X and Y dimensions, respectively.
- Parameters:
sx
- scale factor in the X direction.sy
- scale factor in the Y direction.
public void initTranslate(double tx, double ty)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Initializes the matrix to a transformation that translates by tx and ty in the X and Y dimensions, respectively.
- Parameters:
tx
- amount to translate in the X direction.ty
- amount to translate in the Y direction.
public void invert()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Inverts this matrix.
public static Matrix multiply(Matrix a, Matrix b)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Multiplies 2 matrices and returns the result.
- Parameters:
a
- first matrixb
- second matrix
- Returns:
- The product
public void rotate(double radians)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Appends rotation transformation to this matrix.
- Parameters:
radians
- The rotation angle in radians.
public void scale(double sx, double sy)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Appends non-uniform scaling to this matrix.
- Parameters:
sx
- X axis scaling factorsy
- Y axis scaling factor
public void setX0(double x0)
public void setXX(double xx)
public void setXY(double xy)
public void setY0(double y0)
public void setYX(double yx)
public void setYY(double yy)
public Point transformDistance(Point distance)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Transforms the given distance and returns transformed co-ordinates
public Point transformPoint(Point point)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Transforms the given point and returns transformed co-ordinates
public void translate(double tx, double ty)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
Appends a transaltion transformation to this matrix.
- Parameters:
tx
- X axis translationty
- Y axis translation