# Matrix Constructors

## Definition

Important

Some information relates to prerelease product that may be substantially modified before itâ€™s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Initializes a new instance of the Matrix class.

## Overloads

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

Matrix(Matrix3x2) |
Constructs a Matrix utilizing the specified |

Matrix(Rectangle, Point[]) |
Initializes a new instance of the Matrix class to the geometric transform defined by the specified rectangle and array of points. |

Matrix(RectangleF, PointF[]) |
Initializes a new instance of the Matrix class to the geometric transform defined by the specified rectangle and array of points. |

Matrix(Single, Single, Single, Single, Single, Single) |
Initializes a new instance of the Matrix class with the specified elements. |

## Matrix()

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

```
public:
Matrix();
```

`public Matrix ();`

`Public Sub New ()`

### Applies to

## Matrix(Matrix3x2)

Constructs a Matrix utilizing the specified `matrix`

.

```
public:
Matrix(System::Numerics::Matrix3x2 matrix);
```

`public Matrix (System.Numerics.Matrix3x2 matrix);`

`new System.Drawing.Drawing2D.Matrix : System.Numerics.Matrix3x2 -> System.Drawing.Drawing2D.Matrix`

`Public Sub New (matrix As Matrix3x2)`

#### Parameters

- matrix
- Matrix3x2

Matrix data to construct from.

### Applies to

## Matrix(Rectangle, Point[])

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

```
public:
Matrix(System::Drawing::Rectangle rect, cli::array <System::Drawing::Point> ^ plgpts);
```

`public Matrix (System.Drawing.Rectangle rect, System.Drawing.Point[] plgpts);`

`new System.Drawing.Drawing2D.Matrix : System.Drawing.Rectangle * System.Drawing.Point[] -> System.Drawing.Drawing2D.Matrix`

`Public Sub New (rect As Rectangle, plgpts As Point())`

#### Parameters

- plgpts
- Point[]

An array of three 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.

### Remarks

This method initializes the new Matrix such that it represents the geometric transform that maps the rectangle specified by the `rect`

parameter to the parallelogram defined by the three points in the `plgpts`

parameter. The upper-left corner of the rectangle is mapped to the first point in the `plgpts`

array, the upper-right corner is mapped to the second point, and the lower-left corner is mapped to the third point. The lower-right point of the parallelogram is implied by the first three.

### Applies to

## Matrix(RectangleF, PointF[])

```
public:
Matrix(System::Drawing::RectangleF rect, cli::array <System::Drawing::PointF> ^ plgpts);
```

`public Matrix (System.Drawing.RectangleF rect, System.Drawing.PointF[] plgpts);`

`new System.Drawing.Drawing2D.Matrix : System.Drawing.RectangleF * System.Drawing.PointF[] -> System.Drawing.Drawing2D.Matrix`

`Public Sub New (rect As RectangleF, plgpts As PointF())`

#### Parameters

- rect
- RectangleF

A RectangleF structure that represents the rectangle to be transformed.

- plgpts
- PointF[]

An array of three 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.

### Remarks

This method initializes the new Matrix such that it represents the geometric transform that maps the rectangle specified by the `rect`

parameter to the parallelogram defined by the three points in the `plgpts`

parameter. The upper-left corner of the rectangle is mapped to the first point in the `plgpts`

array, the upper-right corner is mapped to the second point, and the lower-left corner is mapped to the third point. The lower-right point of the parallelogram is implied by the first three.

### Applies to

## Matrix(Single, Single, Single, Single, Single, Single)

Initializes a new instance of the Matrix class with the specified elements.

```
public:
Matrix(float m11, float m12, float m21, float m22, float dx, float dy);
```

`public Matrix (float m11, float m12, float m21, float m22, float dx, float dy);`

`new System.Drawing.Drawing2D.Matrix : single * single * single * single * single * single -> System.Drawing.Drawing2D.Matrix`

`Public Sub New (m11 As Single, m12 As Single, m21 As Single, m22 As Single, dx As Single, dy As Single)`

#### Parameters

### Applies to

## Feedback

Submit and view feedback for