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

SKMatrix(Single, Single, Single, Single, Single, Single, Single, Single, Single)

Creates a new instance of SKMatrix using the specified values.

Properties

Persp0

Gets or sets the x-perspective.

Persp1

Gets or sets the y-perspective.

Persp2

Gets or sets the z-perspective.

ScaleX

Gets or sets the scaling in the x-direction.

ScaleY

Gets or sets the scaling in the y-direction.

SkewX

Gets or sets the skew in the x-direction.

SkewY

Gets or sets the skew in the y-direction.

TransX

Get or sets the translation in the x-direction.

TransY

Get or sets the translation in the y-direction.

Values

Gets or sets the matrix as a flat array: [ScaleX, SkewX, TransX, SkewY, ScaleY, TransY, Persp0, Persp1, Persp2].

Methods

Concat(SKMatrix, SKMatrix, SKMatrix)

Concatenates the specified matrices into the resulting target matrix.

Concat(SKMatrix, SKMatrix, SKMatrix)

Concatenates the specified matrices into the resulting target matrix.

GetValues(Single[])

Populates the specified array with the matrix values.

MakeIdentity()

Creates an identity matrix.

MakeRotation(Single)

Creates a matrix that represents a specific rotation in radians.

MakeRotation(Single, Single, Single)

Creates a matrix that represents a specific rotation in radians, around a pivot point.

MakeRotationDegrees(Single)

Creates a matrix that represents a specific rotation in degrees.

MakeRotationDegrees(Single, Single, Single)

Creates a matrix that represents a specific rotation in degrees, around a pivot point.

MakeScale(Single, Single)

Creates a scaling matrix.

MakeScale(Single, Single, Single, Single)

Creates a scaling matrix, around a pivot point.

MakeSkew(Single, Single)

Creates a skewing matrix.

MakeTranslation(Single, Single)

Creates a translation matrix.

MapPoint(Single, Single)

Applies the matrix to a point.

MapPoint(SKPoint)

Applies the matrix to a point.

MapPoints(SKPoint[])

Applies the matrix to an array of points.

MapPoints(SKPoint[], SKPoint[])

Applies the matrix to an array of points.

MapRadius(Single)

Calculates the mean radius of a circle after it has been mapped by this matrix.

MapRect(SKMatrix, SKRect, SKRect)

Applies the matrix to a rectangle.

MapRect(SKRect)

Applies the matrix to a rectangle.

MapVector(Single, Single)

Applies the matrix to a vector, ignoring translation.

MapVectors(SKPoint[])

Applies the matrix to the array of vectors, ignoring translation, and returns the mapped results.

MapVectors(SKPoint[], SKPoint[])

Apply the to the array of vectors and return the mapped results..

MapXY(Single, Single)

Applies the matrix to a point.

PostConcat(SKMatrix, SKMatrix)

Post-concatenates the matrix to the target matrix.

PostConcat(SKMatrix, SKMatrix)

Post-concatenates the matrix to the target matrix.

PreConcat(SKMatrix, SKMatrix)

Pre-concatenates the matrix to the target matrix.

PreConcat(SKMatrix, SKMatrix)

Pre-concatenates the matrix to the target matrix.

Rotate(SKMatrix, Single)

Rotates the specified matrix by the specified radians.

Rotate(SKMatrix, Single, Single, Single)

Rotates the specified matrix by the specified radians.

RotateDegrees(SKMatrix, Single)

Rotates the specified matrix by the specified degrees.

RotateDegrees(SKMatrix, Single, Single, Single)

Rotates the specified matrix by the specified degrees.

SetScaleTranslate(Single, Single, Single, Single)

Initializes the matrix to be scale + post-translate.

TryInvert(SKMatrix)

Attempts to invert the matrix, if possible the inverse matrix contains the result.

Applies to