XpsMatrix
Inheritance: java.lang.Object, com.aspose.xps.XpsObject
public final class XpsMatrix extends XpsObject
Class incapsulating MatrixTransform property element features. This element defines an arbitrary affine matrix transformation used to manipulate the coordinate systems of elements.
Methods
Method | Description |
---|---|
getM11() | Gets the M11 element. |
getM12() | Gets the M12 element. |
getM21() | Gets the M21 element. |
getM22() | Gets the M22 element. |
getM31() | Gets the M31 element. |
getM32() | Gets the M32 element. |
isIdentity() | Gets a value indicating whether this instance is identity matrix. |
transformPoints(Point2D[] points, int startIndex, int numberOfPoints) | Applies the affine transformation represented by this Matrix to a specified part of array of points. |
transformPoint(Point2D point) | Applies the affine transformation represented by this Matrix to a specified point. |
transformPoints(Point2D[] points) | Applies the affine transformation represented by this Matrix to a specified array of points. |
transform(Rectangle2D rect) | Applies the affine transformation represented by this Matrix to a specified rectangle. |
scale(float scaleX, float scaleY, XpsMatrix.MatrixOrder matrixOrder) | Applies the specified scale vector (scaleX and scaleY) to this Matrix in order specified by matrixOrder . |
scale(float scaleX, float scaleY) | Applies the specified scale vector (scaleX and scaleY) to this Matrix in default (Prepend) order. |
translate(float offsetX, float offsetY, XpsMatrix.MatrixOrder matrixOrder) | Applies the specified translation vector to this Matrix in order specified by matrixOrder . |
translate(float offsetX, float offsetY) | Applies the specified translation vector to this Matrix. |
multiply(XpsMatrix matrix, XpsMatrix.MatrixOrder matrixOrder) | Multiplies this matrix by the matrix specified by the matrix in order specified by matrixOrder . |
multiply(XpsMatrix matrix) | Multiplies this matrix by the matrix specified by the matrix in default (Prepend) order. |
skew(double skewX, double skewY) | Applies specified skew transformation to this Matrix. |
rotate(float angle, XpsMatrix.MatrixOrder matrixOrder) | Applies clockwise rotation by angle to this Matrix in order specified by matrixOrder . |
rotate(float angle) | Applies clockwise rotation by angle to this Matrix in default (Prepend) order. |
rotateAround(float angle, Point2D pivot, XpsMatrix.MatrixOrder matrixOrder) | Applies clockwise rotation by angle around the pivot to this Matrix in order specified by matrixOrder . |
rotateAround(float angle, Point2D pivot) | Applies clockwise rotation by angle around the pivot to this Matrix in default (Prepend) order. |
reset() | Resets this Matrix to identity matrix. |
hashCode() | Returns a hash code for this instance. |
equals(Object obj) | Determines whether the specified object is equal to this instance. |
equals(XpsMatrix a, XpsMatrix b) | The actual implementation. |
op_Equality(XpsMatrix a, XpsMatrix b) | Implements the operator ==. |
op_Inequality(XpsMatrix a, XpsMatrix b) | Implements the operator ! |
toString() | Returns the string representation of this XpsMatrix instance. |
deepClone() | Clones this transformation matrix. |
getM11()
public float getM11()
Gets the M11 element.
Returns: float - The M11 element.
getM12()
public float getM12()
Gets the M12 element.
Returns: float - The M12 element.
getM21()
public float getM21()
Gets the M21 element.
Returns: float - The M21 element.
getM22()
public float getM22()
Gets the M22 element.
Returns: float - The M22 element.
getM31()
public float getM31()
Gets the M31 element.
Returns: float - The M31 element.
getM32()
public float getM32()
Gets the M32 element.
Returns: float - The M32 element.
isIdentity()
public boolean isIdentity()
Gets a value indicating whether this instance is identity matrix.
Value: True if this instance is identity matrix; otherwise, false .
Returns: boolean - A value indicating whether this instance is identity matrix.
transformPoints(Point2D[] points, int startIndex, int numberOfPoints)
public void transformPoints(Point2D[] points, int startIndex, int numberOfPoints)
Applies the affine transformation represented by this Matrix to a specified part of array of points.
Parameters:
Parameter | Type | Description |
---|---|---|
points | java.awt.geom.Point2D[] | The points. |
startIndex | int | The start index. |
numberOfPoints | int | The number of points. |
transformPoint(Point2D point)
public Point2D transformPoint(Point2D point)
Applies the affine transformation represented by this Matrix to a specified point.
Parameters:
Parameter | Type | Description |
---|---|---|
point | java.awt.geom.Point2D | The point. |
Returns: java.awt.geom.Point2D - Transformed point
transformPoints(Point2D[] points)
public void transformPoints(Point2D[] points)
Applies the affine transformation represented by this Matrix to a specified array of points.
Parameters:
Parameter | Type | Description |
---|---|---|
points | java.awt.geom.Point2D[] | The points. |
transform(Rectangle2D rect)
public Rectangle2D transform(Rectangle2D rect)
Applies the affine transformation represented by this Matrix to a specified rectangle.
Parameters:
Parameter | Type | Description |
---|---|---|
rect | java.awt.geom.Rectangle2D | The rectangle. |
Returns: java.awt.geom.Rectangle2D - Transformed rectangle
scale(float scaleX, float scaleY, XpsMatrix.MatrixOrder matrixOrder)
public void scale(float scaleX, float scaleY, XpsMatrix.MatrixOrder matrixOrder)
Applies the specified scale vector (scaleX and scaleY) to this Matrix in order specified by matrixOrder .
Parameters:
Parameter | Type | Description |
---|---|---|
scaleX | float | The scale X. |
scaleY | float | The scale Y. |
matrixOrder | MatrixOrder | The order. |
scale(float scaleX, float scaleY)
public void scale(float scaleX, float scaleY)
Applies the specified scale vector (scaleX and scaleY) to this Matrix in default (Prepend) order.
Parameters:
Parameter | Type | Description |
---|---|---|
scaleX | float | The scale x. |
scaleY | float | The scale y. |
translate(float offsetX, float offsetY, XpsMatrix.MatrixOrder matrixOrder)
public void translate(float offsetX, float offsetY, XpsMatrix.MatrixOrder matrixOrder)
Applies the specified translation vector to this Matrix in order specified by matrixOrder .
Parameters:
Parameter | Type | Description |
---|---|---|
offsetX | float | The offset X. |
offsetY | float | The offset Y. |
matrixOrder | MatrixOrder | The order. |
translate(float offsetX, float offsetY)
public void translate(float offsetX, float offsetY)
Applies the specified translation vector to this Matrix.
Parameters:
Parameter | Type | Description |
---|---|---|
offsetX | float | The offset X. |
offsetY | float | The offset Y. |
multiply(XpsMatrix matrix, XpsMatrix.MatrixOrder matrixOrder)
public void multiply(XpsMatrix matrix, XpsMatrix.MatrixOrder matrixOrder)
Multiplies this matrix by the matrix specified by the matrix in order specified by matrixOrder .
Parameters:
Parameter | Type | Description |
---|---|---|
matrix | XpsMatrix | The matrix. |
matrixOrder | MatrixOrder | The order. |
multiply(XpsMatrix matrix)
public void multiply(XpsMatrix matrix)
Multiplies this matrix by the matrix specified by the matrix in default (Prepend) order.
Parameters:
Parameter | Type | Description |
---|---|---|
matrix | XpsMatrix | The matrix. |
skew(double skewX, double skewY)
public void skew(double skewX, double skewY)
Applies specified skew transformation to this Matrix.
Parameters:
Parameter | Type | Description |
---|---|---|
skewX | double | The skew x. |
skewY | double | The skew y. |
rotate(float angle, XpsMatrix.MatrixOrder matrixOrder)
public void rotate(float angle, XpsMatrix.MatrixOrder matrixOrder)
Applies clockwise rotation by angle to this Matrix in order specified by matrixOrder .
Parameters:
Parameter | Type | Description |
---|---|---|
angle | float | The angle. |
matrixOrder | MatrixOrder | The order. |
rotate(float angle)
public void rotate(float angle)
Applies clockwise rotation by angle to this Matrix in default (Prepend) order.
Parameters:
Parameter | Type | Description |
---|---|---|
angle | float | The angle. |
rotateAround(float angle, Point2D pivot, XpsMatrix.MatrixOrder matrixOrder)
public void rotateAround(float angle, Point2D pivot, XpsMatrix.MatrixOrder matrixOrder)
Applies clockwise rotation by angle around the pivot to this Matrix in order specified by matrixOrder .
Parameters:
Parameter | Type | Description |
---|---|---|
angle | float | The angle. |
pivot | java.awt.geom.Point2D | The pivot point. |
matrixOrder | MatrixOrder | The order. |
rotateAround(float angle, Point2D pivot)
public void rotateAround(float angle, Point2D pivot)
Applies clockwise rotation by angle around the pivot to this Matrix in default (Prepend) order.
Parameters:
Parameter | Type | Description |
---|---|---|
angle | float | The angle. |
pivot | java.awt.geom.Point2D | The pivot point. |
reset()
public void reset()
Resets this Matrix to identity matrix.
hashCode()
public int hashCode()
Returns a hash code for this instance.
Returns: int - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
equals(Object obj)
public boolean equals(Object obj)
Determines whether the specified object is equal to this instance.
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object | The object to compare with this instance. |
Returns: boolean - true if the specified object is equal to this instance; otherwise, false . The obj parameter is null.
equals(XpsMatrix a, XpsMatrix b)
public static boolean equals(XpsMatrix a, XpsMatrix b)
The actual implementation.
Parameters:
Parameter | Type | Description |
---|---|---|
a | XpsMatrix | The first matrix. |
b | XpsMatrix | The second matrix. |
Returns: boolean - [true] if martrices are equals
op_Equality(XpsMatrix a, XpsMatrix b)
public static boolean op_Equality(XpsMatrix a, XpsMatrix b)
Implements the operator ==.
Parameters:
Parameter | Type | Description |
---|---|---|
a | XpsMatrix | The first matrix. |
b | XpsMatrix | The second matrix. |
Returns: boolean - The result of the operator.
op_Inequality(XpsMatrix a, XpsMatrix b)
public static boolean op_Inequality(XpsMatrix a, XpsMatrix b)
Implements the operator !=.
Parameters:
Parameter | Type | Description |
---|---|---|
a | XpsMatrix | The first matrix. |
b | XpsMatrix | The second matrix. |
Returns: boolean - The result of the operator.
toString()
public String toString()
Returns the string representation of this XpsMatrix instance.
Returns: java.lang.String - String representation
deepClone()
public XpsMatrix deepClone()
Clones this transformation matrix.
Returns: XpsMatrix - Clone of this transformation matrix.