---
title: "TransformsProvider.ApplyMatrix Method (Matrix)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_TransformsProvider_ApplyMatrix_1_05ab20fe.htm
product: "Graphics Mill"
---

# TransformsProvider.ApplyMatrix Method (Matrix)
 
Applies a linear transformation of the bitmap (based on specified matrix).
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public void ApplyMatrix(Matrix matrix
)
```
 
### Parameters
 
 - matrix
     - Type: [Aurigma.GraphicsMill.Transforms.Matrix](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
A [Matrix](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md) of the linear transformation.
 
## Remarks
 You can also use [MatrixTransform](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_MatrixTransform.htm.md) class to apply this effect.
 
## Examples
  
Here is an example how to apply skew transform using the affine matrix:
 
```csharp
int horizontalOffset = 20;
int verticalOffset = 40;

System.Drawing.PointF[] sourcePoints = new System.Drawing.PointF[]{
    new System.Drawing.PointF(0.0F, 0.0F), 
    new System.Drawing.PointF(bitmap.Width - 1, 0.0F),
    new System.Drawing.PointF(0.0F, bitmap.Height - 1)
};

System.Drawing.PointF[] destinationPoints = new System.Drawing.PointF[]{
    new System.Drawing.PointF(0, 0),
    new System.Drawing.PointF(bitmap.Width - 1, verticalOffset),
    new System.Drawing.PointF(horizontalOffset, bitmap.Height - 1)
};

var matrix = Matrix.CreateFromAffinePoints(sourcePoints, destinationPoints);
bitmap.Transforms.ApplyMatrix(matrix);
```
   
## See Also

### Reference

- [TransformsProvider Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_TransformsProvider.htm.md)
- [ApplyMatrix Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_TransformsProvider_ApplyMatrix.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)

### Manual

- [Affine and Projective Transformations](https://www.graphicsmill.com/docs/gm/affine-and-projective-transformations.htm.md)
