
**Inheritance:**
java.lang.Object
```
public class Matrix
```

Replaces the GDI+ Matrix.

Most algorithms taken from Sun's AffineTransform.java. Java's names for matrix elements used internally. Map of java names to .net ones to description: m00 M11 Scale X m10 M12 Shear Y m01 M21 Shear X m11 M22 Scale Y m02 M31 Translate X m12 M32 Translate Y
## Constructors

| Constructor | Description |
| --- | --- |
| [Matrix()](#Matrix--) | Initializes a new instance of the Matrix class as the identity matrix. |
| [Matrix(float m11, float m12, float m21, float m22, float m31, float m32)](#Matrix-float-float-float-float-float-float-) | Initializes a new instance of the  Matrix  class. |
| [Matrix(Matrix origin)](#Matrix-com.aspose.psd.Matrix-) | Makes a copy of the  Matrix  class. |
| [Matrix(RectangleF rect, PointF[] plgpts)](#Matrix-com.aspose.psd.RectangleF-com.aspose.psd.PointF---) | Initializes a new instance of the  Aspose.Imaging.Matrix  class to the geometric transform defined by the specified rectangle and array of points. |
| [Matrix(Rectangle rect, Point[] plgpts)](#Matrix-com.aspose.psd.Rectangle-com.aspose.psd.Point---) | Initializes a new instance of the  Aspose.Imaging.Matrix  class to the geometric transform defined by the specified rectangle and array of points. |
## Fields

| Field | Description |
| --- | --- |
| [TYPE_FLIP](#TYPE-FLIP) | This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits. |
| [TYPE_GENERAL_ROTATION](#TYPE-GENERAL-ROTATION) | This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits. |
| [TYPE_GENERAL_SCALE](#TYPE-GENERAL-SCALE) | A general scale multiplies the length of vectors by different amounts in the x and y directions without changing the angle between perpendicular vectors. |
| [TYPE_GENERAL_TRANSFORM](#TYPE-GENERAL-TRANSFORM) | This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates. |
| [TYPE_IDENTITY](#TYPE-IDENTITY) | An identity transform is one in which the output coordinates are always the same as the input coordinates. |
| [TYPE_MASK_ROTATION](#TYPE-MASK-ROTATION) | This constant is a bit mask for any of the rotation flag bits. |
| [TYPE_MASK_SCALE](#TYPE-MASK-SCALE) | This constant is a bit mask for any of the scale flag bits. |
| [TYPE_QUADRANT_ROTATION](#TYPE-QUADRANT-ROTATION) | This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits. |
| [TYPE_TRANSLATION](#TYPE-TRANSLATION) | A translation moves the coordinates by a constant amount in x and y without changing the length or angle of vectors. |
| [TYPE_UNIFORM_SCALE](#TYPE-UNIFORM-SCALE) | A uniform scale multiplies the length of vectors by the same amount in both the x and y directions without changing the angle between vectors. |
## Methods

| Method | Description |
| --- | --- |
| [equals(Object obj)](#equals-java.lang.Object-) | Determines whether the specified  System.Object  is equal to this instance. |
| [getClass()](#getClass--) |  |
| [getElements()](#getElements--) | Gets the copy of matrix elements. |
| [getM11()](#getM11--) | Gets the matrix element at first row first column. |
| [getM12()](#getM12--) | Gets the matrix element at first row second column. |
| [getM21()](#getM21--) | Gets the matrix element at second row first column. |
| [getM22()](#getM22--) | Gets the matrix element at second row second column. |
| [getM31()](#getM31--) | Gets the matrix element at third row first column. |
| [getM32()](#getM32--) | Gets the matrix element at third row first column. |
| [hashCode()](#hashCode--) | Returns a hash code for this instance. |
| [isEquals(Matrix a, Matrix b)](#isEquals-com.aspose.psd.Matrix-com.aspose.psd.Matrix-) | Determines whether two matrixes are equal. |
| [isIdentity()](#isIdentity--) | Returns `true` if this `AffineTransform` is an identity transform. |
| [multiply(Matrix Tx)](#multiply-com.aspose.psd.Matrix-) | Multiplies this Matrix by the matrix specified in the matrix parameter using (default) Prepend order. |
| [multiply(Matrix Tx, int order)](#multiply-com.aspose.psd.Matrix-int-) | Multiplies this Matrix by the matrix specified in the matrix parameter, and in the order specified in the order parameter. |
| [notify()](#notify--) |  |
| [notifyAll()](#notifyAll--) |  |
| [reset()](#reset--) | Resets this Matrix to have the elements of the identity matrix. |
| [rotate(float angle)](#rotate-float-) | Applies a clockwise rotation of an amount specified in the angle parameter, around the origin (zero x and y coordinates) for this Matrix in the default (Prepend) order. |
| [rotate(float angle, int order)](#rotate-float-int-) | Applies a clockwise rotation of an amount specified in the angle parameter, around the origin (zero x and y coordinates) for this Matrix in the specified order. |
| [rotateAt(float angle, PointF point)](#rotateAt-float-com.aspose.psd.PointF-) | Applies a clockwise rotation about the specified point to this Matrix in the default (Prepend) order. |
| [rotateAt(float angle, PointF point, int order)](#rotateAt-float-com.aspose.psd.PointF-int-) | Applies a clockwise rotation about the specified point to this Matrix in the specified order. |
| [scale(float sx, float sy)](#scale-float-float-) | Applies the specified scale vector (scaleX and scaleY) to this Matrix using (default) Prepend order. |
| [scale(float scaleX, float scaleY, int order)](#scale-float-float-int-) | Applies the specified scale vector (scaleX and scaleY) to this  Matrix  using the specified order. |
| [toString()](#toString--) | Returns a  System.String  that represents this instance. |
| [transformPoints(PointF[] points)](#transformPoints-com.aspose.psd.PointF---) | Applies the geometric transform represented by this  Matrix  to a specified array of points. |
| [translate(float tx, float ty)](#translate-float-float-) | Applies the specified translation vector to this  Matrix  using (default) Prepend order. |
| [translate(float offsetX, float offsetY, int order)](#translate-float-float-int-) | Applies the specified translation vector to this Matrix in the specified order. |
| [wait()](#wait--) |  |
| [wait(long arg0)](#wait-long-) |  |
| [wait(long arg0, int arg1)](#wait-long-int-) |  |
### Matrix() {#Matrix--}
```
public Matrix()
```


Initializes a new instance of the Matrix class as the identity matrix.

### Matrix(float m11, float m12, float m21, float m22, float m31, float m32) {#Matrix-float-float-float-float-float-float-}
```
public Matrix(float m11, float m12, float m21, float m22, float m31, float m32)
```


Initializes a new instance of the  Matrix  class.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| m11 | float | m00 M11 Scale X |
| m12 | float | m10 M12 Shear Y |
| m21 | float | m01 M21 Shear X |
| m22 | float | m11 M22 Scale Y |
| m31 | float | m02 M31 Translate X |
| m32 | float | m12 M32 Translate Y |

### Matrix(Matrix origin) {#Matrix-com.aspose.psd.Matrix-}
```
public Matrix(Matrix origin)
```


Makes a copy of the  Matrix  class.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| origin | [Matrix](../../com.aspose.psd/matrix) | the base matrix for coping |

### Matrix(RectangleF rect, PointF[] plgpts) {#Matrix-com.aspose.psd.RectangleF-com.aspose.psd.PointF---}
```
public Matrix(RectangleF rect, PointF[] plgpts)
```


Initializes a new instance of the  Aspose.Imaging.Matrix  class to the geometric transform defined by the specified rectangle and array of points.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| rect | [RectangleF](../../com.aspose.psd/rectanglef) | A  Aspose.Imaging.RectangleF  structure that represents the rectangle to be transformed. |
| plgpts | [PointF\[\]](../../com.aspose.psd/pointf) | An array of three  Aspose.Imaging.PointF  structures that represents the points of a parallelogram to which the upper-left, upper-right, and lower-left corners of the rectangle is to be transformed. The lower-right corner of the parallelogram is implied by the first three corners. |

### Matrix(Rectangle rect, Point[] plgpts) {#Matrix-com.aspose.psd.Rectangle-com.aspose.psd.Point---}
```
public Matrix(Rectangle rect, Point[] plgpts)
```


Initializes a new instance of the  Aspose.Imaging.Matrix  class to the geometric transform defined by the specified rectangle and array of points.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| rect | [Rectangle](../../com.aspose.psd/rectangle) | A  Aspose.Imaging.Rectangle  structure that represents the rectangle to be transformed. |
| plgpts | [Point\[\]](../../com.aspose.psd/point) | An array of three  Aspose.Imaging.Point  structures that represents the points of a parallelogram to which the upper-left, upper-right, and lower-left corners of the rectangle is to be transformed. The lower-right corner of the parallelogram is implied by the first three corners. |

### TYPE_FLIP {#TYPE-FLIP}
```
public static final int TYPE_FLIP
```


This flag bit indicates that the transform defined by this object performs a mirror image flip about some axis which changes the normally right handed coordinate system into a left handed system in addition to the conversions indicated by other flag bits. A right handed coordinate system is one where the positive X axis rotates counterclockwise to overlay the positive Y axis similar to the direction that the fingers on your right hand curl when you stare end on at your thumb. A left handed coordinate system is one where the positive X axis rotates clockwise to overlay the positive Y axis similar to the direction that the fingers on your left hand curl. There is no mathematical way to determine the angle of the original flipping or mirroring transformation since all angles of flip are identical given an appropriate adjusting rotation. NOTE: TypeFlip was added after GENERAL\_TRANSFORM was in public circulation and the flag bits could no longer be conveniently renumbered without introducing binary incompatibility in outside code.

### TYPE_GENERAL_ROTATION {#TYPE-GENERAL-ROTATION}
```
public static final int TYPE_GENERAL_ROTATION
```


This flag bit indicates that the transform defined by this object performs a rotation by an arbitrary angle in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the

### TYPE_GENERAL_SCALE {#TYPE-GENERAL-SCALE}
```
public static final int TYPE_GENERAL_SCALE
```


A general scale multiplies the length of vectors by different amounts in the x and y directions without changing the angle between perpendicular vectors. This flag bit is mutually exclusive with the TypeUniformScale flag.

### TYPE_GENERAL_TRANSFORM {#TYPE-GENERAL-TRANSFORM}
```
public static final int TYPE_GENERAL_TRANSFORM
```


This constant indicates that the transform defined by this object performs an arbitrary conversion of the input coordinates. If this transform can be classified by any of the above constants, the type will either be the constant TypeIdentity or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.

### TYPE_IDENTITY {#TYPE-IDENTITY}
```
public static final int TYPE_IDENTITY
```


An identity transform is one in which the output coordinates are always the same as the input coordinates. If this transform is anything other than the identity transform, the type will either be the constant GENERAL\_TRANSFORM or a combination of the appropriate flag bits for the various coordinate conversions that this transform performs.

### TYPE_MASK_ROTATION {#TYPE-MASK-ROTATION}
```
public static final int TYPE_MASK_ROTATION
```


This constant is a bit mask for any of the rotation flag bits.

### TYPE_MASK_SCALE {#TYPE-MASK-SCALE}
```
public static final int TYPE_MASK_SCALE
```


This constant is a bit mask for any of the scale flag bits.

### TYPE_QUADRANT_ROTATION {#TYPE-QUADRANT-ROTATION}
```
public static final int TYPE_QUADRANT_ROTATION
```


This flag bit indicates that the transform defined by this object performs a quadrant rotation by some multiple of 90 degrees in addition to the conversions indicated by other flag bits. A rotation changes the angles of vectors by the same amount regardless of the original direction of the vector and without changing the length of the vector. This flag bit is mutually exclusive with the TypeGeneralRotation flag.

### TYPE_TRANSLATION {#TYPE-TRANSLATION}
```
public static final int TYPE_TRANSLATION
```


A translation moves the coordinates by a constant amount in x and y without changing the length or angle of vectors.

### TYPE_UNIFORM_SCALE {#TYPE-UNIFORM-SCALE}
```
public static final int TYPE_UNIFORM_SCALE
```


A uniform scale multiplies the length of vectors by the same amount in both the x and y directions without changing the angle between vectors. This flag bit is mutually exclusive with the TypeGeneralScale flag.

### equals(Object obj) {#equals-java.lang.Object-}
```
public boolean equals(Object obj)
```


Determines whether the specified  System.Object  is equal to this instance.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| obj | java.lang.Object | The  System.Object  to compare with this instance. |

**Returns:**
boolean -  true  if the specified  System.Object  is equal to this instance; otherwise,  false .
### getClass() {#getClass--}
```
public final native Class<?> getClass()
```




**Returns:**
java.lang.Class<?>
### getElements() {#getElements--}
```
public float[] getElements()
```


Gets the copy of matrix elements.

**Returns:**
float[] - A matrix elements copy.
### getM11() {#getM11--}
```
public float getM11()
```


Gets the matrix element at first row first column. Represents scale along X axis.

**Returns:**
float
### getM12() {#getM12--}
```
public float getM12()
```


Gets the matrix element at first row second column. Represents shear along Y axis.

**Returns:**
float
### getM21() {#getM21--}
```
public float getM21()
```


Gets the matrix element at second row first column. Represents shear along X axis.

**Returns:**
float
### getM22() {#getM22--}
```
public float getM22()
```


Gets the matrix element at second row second column. Represents scale along Y axis.

**Returns:**
float
### getM31() {#getM31--}
```
public float getM31()
```


Gets the matrix element at third row first column. Represents translation along X axis.

**Returns:**
float
### getM32() {#getM32--}
```
public float getM32()
```


Gets the matrix element at third row first column. Represents translation along Y axis.

**Returns:**
float
### hashCode() {#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.
### isEquals(Matrix a, Matrix b) {#isEquals-com.aspose.psd.Matrix-com.aspose.psd.Matrix-}
```
public static boolean isEquals(Matrix a, Matrix b)
```


Determines whether two matrixes are equal.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| a | [Matrix](../../com.aspose.psd/matrix) | The first matrix to compare. |
| b | [Matrix](../../com.aspose.psd/matrix) | The second matrix to compare. |

**Returns:**
boolean - True if matrixes are equal.
### isIdentity() {#isIdentity--}
```
public boolean isIdentity()
```


Returns `true` if this `AffineTransform` is an identity transform.

**Returns:**
boolean - `true` if this `AffineTransform` is an identity transform; `false` otherwise.
### multiply(Matrix Tx) {#multiply-com.aspose.psd.Matrix-}
```
public void multiply(Matrix Tx)
```


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

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| Tx | [Matrix](../../com.aspose.psd/matrix) | The matrix to multiply with. |

### multiply(Matrix Tx, int order) {#multiply-com.aspose.psd.Matrix-int-}
```
public void multiply(Matrix Tx, int order)
```


Multiplies this Matrix by the matrix specified in the matrix parameter, and in the order specified in the order parameter.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| Tx | [Matrix](../../com.aspose.psd/matrix) | The tx. The tx. The tx. |
| order | int | The order. The order. The order. |

### notify() {#notify--}
```
public final native void notify()
```




### notifyAll() {#notifyAll--}
```
public final native void notifyAll()
```




### reset() {#reset--}
```
public void reset()
```


Resets this Matrix to have the elements of the identity matrix.

### rotate(float angle) {#rotate-float-}
```
public void rotate(float angle)
```


Applies a clockwise rotation of an amount specified in the angle parameter, around the origin (zero x and y coordinates) for this Matrix in the default (Prepend) order.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| angle | float | The rotate angle. |

### rotate(float angle, int order) {#rotate-float-int-}
```
public void rotate(float angle, int order)
```


Applies a clockwise rotation of an amount specified in the angle parameter, around the origin (zero x and y coordinates) for this Matrix in the specified order.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| angle | float | The rotate angle. |
| order | int | The matrix order. |

### rotateAt(float angle, PointF point) {#rotateAt-float-com.aspose.psd.PointF-}
```
public void rotateAt(float angle, PointF point)
```


Applies a clockwise rotation about the specified point to this Matrix in the default (Prepend) order.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| angle | float | The angle. |
| point | [PointF](../../com.aspose.psd/pointf) | The point. |

### rotateAt(float angle, PointF point, int order) {#rotateAt-float-com.aspose.psd.PointF-int-}
```
public void rotateAt(float angle, PointF point, int order)
```


Applies a clockwise rotation about the specified point to this Matrix in the specified order.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| angle | float | The angle. |
| point | [PointF](../../com.aspose.psd/pointf) | The point. |
| order | int | The order. |

### scale(float sx, float sy) {#scale-float-float-}
```
public void scale(float sx, float sy)
```


Applies the specified scale vector (scaleX and scaleY) to this Matrix using (default) Prepend order.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| sx | float | The sx. The sx. The sx. |
| sy | float | The sy. The sy. The sy. |

### scale(float scaleX, float scaleY, int order) {#scale-float-float-int-}
```
public void scale(float scaleX, float scaleY, int order)
```


Applies the specified scale vector (scaleX and scaleY) to this  Matrix  using the specified order.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| scaleX | float | The scale X. |
| scaleY | float | The scale Y. |
| order | int | The order. |

### toString() {#toString--}
```
public String toString()
```


Returns a  System.String  that represents this instance.

**Returns:**
java.lang.String - A  System.String  that represents this instance.
### transformPoints(PointF[] points) {#transformPoints-com.aspose.psd.PointF---}
```
public void transformPoints(PointF[] points)
```


Applies the geometric transform represented by this  Matrix  to a specified array of points.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| points | [PointF\[\]](../../com.aspose.psd/pointf) | The points. |

### translate(float tx, float ty) {#translate-float-float-}
```
public void translate(float tx, float ty)
```


Applies the specified translation vector to this  Matrix  using (default) Prepend order.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| tx | float | The tx. The tx. The tx. |
| ty | float | The ty. The ty. The ty. |

### translate(float offsetX, float offsetY, int order) {#translate-float-float-int-}
```
public void translate(float offsetX, float offsetY, int order)
```


Applies the specified translation vector to this Matrix in the specified order.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| offsetX | float | The offset X. |
| offsetY | float | The offset Y. |
| order | int | The order. |

### wait() {#wait--}
```
public final void wait()
```




### wait(long arg0) {#wait-long-}
```
public final void wait(long arg0)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}
```
public final void wait(long arg0, int arg1)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |

