| Modifier and Type | Field and Description |
|---|---|
| private float[] | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| private | |
| private | |
| public | Matrix(float
the X coordinate scaling element (m00) of the 3x3 matrix a, float the Y coordinate shearing element (m10) of the 3x3 matrix b, float the X coordinate shearing element (m01) of the 3x3 matrix c, float the Y coordinate scaling element (m11) of the 3x3 matrix d, float the X coordinate translation element (m02) of the 3x3 matrix e, float the Y coordinate translation element (m12) of the 3x3 matrix f)Creates a transformation matrix with the given 6 elements. |
| public | Matrix(AffineTransform
matrix elements will be initialize with the values from this affine transformation, as follows:
scaleX shearY 0
shearX scaleY 0
transX transY 1 at)Creates a matrix with the same elements as the given AffineTransform. |
| Modifier and Type | Method and Description |
|---|---|
| private float[] | |
| public Matrix | |
| public void | concatenate(Matrix
The matrix to concatenate. matrix)Concatenates (premultiplies) the given matrix to this matrix. |
| public static Matrix | Returns: a copy of the first matrix with the second matrix concatenatedThe matrix to copy. a, Matrix The matrix to concatenate. b)Produces a copy of the first matrix, with the second matrix concatenated. |
| public AffineTransform | Returns: An affine transform with this matrix's values.Create an affine transform from this matrix's values. |
| public static Matrix | Returns: a Matrix object.a COS object, preferably a COSArray with six numbers. base)Convenience method to be used when creating a matrix from unverified data. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public static Matrix | Returns: A new matrix with the rotation and the x/y translating.The angle of rotation measured in radians theta, float The x translation. tx, float The y translation. ty)Convenience method to create a rotated instance. |
| public static Matrix | Returns: A new matrix with just the x/y scalingThe xscale operator. x, float The yscale operator. y)Convenience method to create a scaled instance. |
| public float | Returns: the x-scaling element of the matrixReturns the x-scaling element of this matrix. |
| public float | Returns: the y-scaling element of the matrixReturns the y-scaling element of this matrix. |
| public float | |
| public float | |
| public float | |
| public float | |
| public static Matrix | Returns: A new matrix with just the x/y translating.The x translating operator. x, float The y translating operator. y)Convenience method to create a translating instance. |
| public float | Returns: the x-translation element of the matrixReturns the x-translation element of this matrix. |
| public float | Returns: the y-translation element of the matrixReturns the y-translation element of this matrix. |
| public float | Returns: The value at the row/column position.The row to get the value from. row, int The column to get the value from. column)This will get a matrix value at some point. |
| public float[][] | Returns: The values of this matrix.Return a single dimension array of all values in the matrix. |
| public int | |
| public Matrix | |
| private float[] | |
| public void | rotate(double
The angle of rotation measured in radians theta)Rotates this matrix by the given factors. |
| public void | |
| public void | setValue(int
The row to set the value at. row, int the column to set the value at. column, float The value to set at the position. value)This will set a value at a position. |
| public COSArray | Returns: a COSArray representing the geometric relevant components of the matrixReturns a COS array which represent the geometric relevant components of the matrix. |
| public String | |
| public void | |
| public Vector | |
| public Point2D. | Returns: the transformed point.x-coordinate x, float y-coordinate y)Transforms the given point by this matrix. |
| public void | |
| public void |
| single | back to summary |
|---|---|
| private float[] single | |
| SIZE | back to summary |
|---|---|
| public static final int SIZE | |
| Matrix | back to summary |
|---|---|
| public Matrix() Constructor. This produces an identity matrix. | |
| Matrix | back to summary |
|---|---|
| private Matrix(float[] src) Constructor. This produces a matrix with the given array as data. The source array is not copied or cloned. | |
| Matrix | back to summary |
|---|---|
| private Matrix(COSArray array) Creates a matrix from a 6-element (a b c d e f) COS array.
| |
| Matrix | back to summary |
|---|---|
| public Matrix(float a, float b, float c, float d, float e, float f) Creates a transformation matrix with the given 6 elements. Transformation matrices are discussed in 8.3.3, "Common Transformations" and 8.3.4, "Transformation Matrices" of the PDF specification. For simple purposes (rotate, scale, translate) it is recommended to use the static methods below. Produces the following matrix: a b 0 c d 0 e f 1
| |
| Matrix | back to summary |
|---|---|
| public Matrix(AffineTransform at) Creates a matrix with the same elements as the given AffineTransform.
| |
| checkFloatValues | back to summary |
|---|---|
| private float[] checkFloatValues(float[] values) | |
| clone | back to summary |
|---|---|
| public Matrix clone() Overrides java. Clones this object. | |
| concatenate | back to summary |
|---|---|
| public void concatenate(Matrix matrix) Concatenates (premultiplies) the given matrix to this matrix.
| |
| concatenate | back to summary |
|---|---|
| public static Matrix concatenate(Matrix a, Matrix b) Produces a copy of the first matrix, with the second matrix concatenated. | |
| createAffineTransform | back to summary |
|---|---|
| public AffineTransform createAffineTransform() Create an affine transform from this matrix's values.
| |
| createMatrix | back to summary |
|---|---|
| public static Matrix createMatrix(COSBase base) Convenience method to be used when creating a matrix from unverified data. If the parameter is a COSArray with at least six numbers, a Matrix object is created from the first six numbers and returned. If not, then the identity Matrix is returned. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getRotateInstance | back to summary |
|---|---|
| public static Matrix getRotateInstance(double theta, float tx, float ty) Convenience method to create a rotated instance.
| |
| getScaleInstance | back to summary |
|---|---|
| public static Matrix getScaleInstance(float x, float y) Convenience method to create a scaled instance. Produces the following matrix: x 0 0 0 y 0 0 0 1
| |
| getScaleX | back to summary |
|---|---|
| public float getScaleX() Returns the x-scaling element of this matrix.
| |
| getScaleY | back to summary |
|---|---|
| public float getScaleY() Returns the y-scaling element of this matrix.
| |
| getScalingFactorX | back to summary |
|---|---|
| public float getScalingFactorX() Returns the x-scaling factor of this matrix. This is calculated from the scale and shear.
| |
| getScalingFactorY | back to summary |
|---|---|
| public float getScalingFactorY() Returns the y-scaling factor of this matrix. This is calculated from the scale and shear.
| |
| getShearX | back to summary |
|---|---|
| public float getShearX() Returns the x-shear element of this matrix.
| |
| getShearY | back to summary |
|---|---|
| public float getShearY() Returns the y-shear element of this matrix.
| |
| getTranslateInstance | back to summary |
|---|---|
| public static Matrix getTranslateInstance(float x, float y) Convenience method to create a translating instance. Produces the following matrix: 1 0 0 0 1 0 x y 1
| |
| getTranslateX | back to summary |
|---|---|
| public float getTranslateX() Returns the x-translation element of this matrix.
| |
| getTranslateY | back to summary |
|---|---|
| public float getTranslateY() Returns the y-translation element of this matrix.
| |
| getValue | back to summary |
|---|---|
| public float getValue(int row, int column) This will get a matrix value at some point.
| |
| getValues | back to summary |
|---|---|
| public float[][] getValues() Return a single dimension array of all values in the matrix.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| multiply | back to summary |
|---|---|
| public Matrix multiply(Matrix other) This method multiplies this Matrix with the specified other Matrix, storing the product in a new instance. It is allowed to have (other == this). | |
| multiplyArrays | back to summary |
|---|---|
| private float[] multiplyArrays(float[] a, float[] b) | |
| rotate | back to summary |
|---|---|
| public void rotate(double theta) Rotates this matrix by the given factors.
| |
| scale | back to summary |
|---|---|
| public void scale(float sx, float sy) Scales this matrix by the given factors.
| |
| setValue | back to summary |
|---|---|
| public void setValue(int row, int column, float value) This will set a value at a position.
| |
| toCOSArray | back to summary |
|---|---|
| public COSArray toCOSArray() Returns a COS array which represent the geometric relevant components of the matrix. The last column of the matrix is ignored, only the first two columns are returned. This is analog to the Matrix(COSArray) constructor.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| transform | back to summary |
|---|---|
| public void transform(Point2D point) Transforms the given point by this matrix.
| |
| transform | back to summary |
|---|---|
| public Vector transform(Vector vector) Transforms the given vector by this matrix. | |
| transformPoint | back to summary |
|---|---|
| public Point2D. Transforms the given point by this matrix. | |
| translate | back to summary |
|---|---|
| public void translate(Vector vector) Translates this matrix by the given vector.
| |
| translate | back to summary |
|---|---|
| public void translate(float tx, float ty) Translates this matrix by the given amount.
| |