# SKMatrix Struct

## Definition

A 3x3 transformation matrix with perspective.

``public struct SKMatrix``
Inheritance
SKMatrix

## Remarks

It extends the traditional 2D affine transformation matrix with three perspective components that allow simple 3D effects to be created with it. Those components must be manually set by using the Persp0, Persp1, Persp2 fields of the matrix.

## Constructors

 Creates a new instance of SKMatrix using the specified values.

## Properties

 Gets or sets the x-perspective. Gets or sets the y-perspective. Gets or sets the z-perspective. Gets or sets the scaling in the x-direction. Gets or sets the scaling in the y-direction. Gets or sets the skew in the x-direction. Gets or sets the skew in the y-direction. Get or sets the translation in the x-direction. Get or sets the translation in the y-direction. Gets or sets the matrix as a flat array: [ScaleX, SkewX, TransX, SkewY, ScaleY, TransY, Persp0, Persp1, Persp2].

## Methods

 Concatenates the specified matrices into the resulting target matrix. Concatenates the specified matrices into the resulting target matrix. Populates the specified array with the matrix values. Creates an identity matrix. Creates a matrix that represents a specific rotation in radians. Creates a matrix that represents a specific rotation in radians, around a pivot point. Creates a matrix that represents a specific rotation in degrees. Creates a matrix that represents a specific rotation in degrees, around a pivot point. Creates a scaling matrix. Creates a scaling matrix, around a pivot point. Creates a skewing matrix. Creates a translation matrix. Applies the matrix to a point. Applies the matrix to a point. Applies the matrix to an array of points. Applies the matrix to an array of points. Calculates the mean radius of a circle after it has been mapped by this matrix. Applies the matrix to a rectangle. Applies the matrix to a rectangle. Applies the matrix to a vector, ignoring translation. Applies the matrix to the array of vectors, ignoring translation, and returns the mapped results. Apply the to the array of vectors and return the mapped results.. Applies the matrix to a point. Post-concatenates the matrix to the target matrix. Post-concatenates the matrix to the target matrix. Pre-concatenates the matrix to the target matrix. Pre-concatenates the matrix to the target matrix. Rotates the specified matrix by the specified radians. Rotates the specified matrix by the specified radians. Rotates the specified matrix by the specified degrees. Rotates the specified matrix by the specified degrees. Initializes the matrix to be scale + post-translate. Attempts to invert the matrix, if possible the inverse matrix contains the result.