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

MethodDescription
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:

ParameterTypeDescription
pointsjava.awt.geom.Point2D[]The points.
startIndexintThe start index.
numberOfPointsintThe number of points.

transformPoint(Point2D point)

public Point2D transformPoint(Point2D point)

Applies the affine transformation represented by this Matrix to a specified point.

Parameters:

ParameterTypeDescription
pointjava.awt.geom.Point2DThe 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:

ParameterTypeDescription
pointsjava.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:

ParameterTypeDescription
rectjava.awt.geom.Rectangle2DThe 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:

ParameterTypeDescription
scaleXfloatThe scale X.
scaleYfloatThe scale Y.
matrixOrderMatrixOrderThe 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:

ParameterTypeDescription
scaleXfloatThe scale x.
scaleYfloatThe 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:

ParameterTypeDescription
offsetXfloatThe offset X.
offsetYfloatThe offset Y.
matrixOrderMatrixOrderThe order.

translate(float offsetX, float offsetY)

public void translate(float offsetX, float offsetY)

Applies the specified translation vector to this Matrix.

Parameters:

ParameterTypeDescription
offsetXfloatThe offset X.
offsetYfloatThe 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:

ParameterTypeDescription
matrixXpsMatrixThe matrix.
matrixOrderMatrixOrderThe order.

multiply(XpsMatrix matrix)

public void multiply(XpsMatrix matrix)

Multiplies this matrix by the matrix specified by the matrix in default (Prepend) order.

Parameters:

ParameterTypeDescription
matrixXpsMatrixThe matrix.

skew(double skewX, double skewY)

public void skew(double skewX, double skewY)

Applies specified skew transformation to this Matrix.

Parameters:

ParameterTypeDescription
skewXdoubleThe skew x.
skewYdoubleThe 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:

ParameterTypeDescription
anglefloatThe angle.
matrixOrderMatrixOrderThe order.

rotate(float angle)

public void rotate(float angle)

Applies clockwise rotation by angle to this Matrix in default (Prepend) order.

Parameters:

ParameterTypeDescription
anglefloatThe 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:

ParameterTypeDescription
anglefloatThe angle.
pivotjava.awt.geom.Point2DThe pivot point.
matrixOrderMatrixOrderThe 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:

ParameterTypeDescription
anglefloatThe angle.
pivotjava.awt.geom.Point2DThe 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:

ParameterTypeDescription
objjava.lang.ObjectThe 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:

ParameterTypeDescription
aXpsMatrixThe first matrix.
bXpsMatrixThe 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:

ParameterTypeDescription
aXpsMatrixThe first matrix.
bXpsMatrixThe 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:

ParameterTypeDescription
aXpsMatrixThe first matrix.
bXpsMatrixThe 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.