SKMatrix Struct
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.
A 3x3 transformation matrix with perspective.
public struct SKMatrix
public struct SKMatrix : IEquatable<SkiaSharp.SKMatrix>
- Inheritance
-
SKMatrix
- Implements
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. |
SKMatrix(Single[]) |
Fields
Empty | |
Identity |
Properties
IsIdentity | |
IsInvertible | |
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. |
Concat(SKMatrix, SKMatrix) | |
CreateIdentity() | |
CreateRotation(Single, Single, Single) | |
CreateRotation(Single) | |
CreateRotationDegrees(Single, Single, Single) | |
CreateRotationDegrees(Single) | |
CreateScale(Single, Single, Single, Single) | |
CreateScale(Single, Single) | |
CreateScaleTranslation(Single, Single, Single, Single) | |
CreateSkew(Single, Single) | |
CreateTranslation(Single, Single) | |
Equals(Object) | |
Equals(SKMatrix) | |
GetHashCode() | |
GetValues(Single[]) |
Populates the specified array with the matrix values. |
Invert() | |
MakeIdentity() |
Obsolete.
Creates an identity matrix. |
MakeRotation(Single, Single, Single) |
Obsolete.
Creates a matrix that represents a specific rotation in radians, around a pivot point. |
MakeRotation(Single) |
Obsolete.
Creates a matrix that represents a specific rotation in radians. |
MakeRotationDegrees(Single, Single, Single) |
Obsolete.
Creates a matrix that represents a specific rotation in degrees, around a pivot point. |
MakeRotationDegrees(Single) |
Obsolete.
Creates a matrix that represents a specific rotation in degrees. |
MakeScale(Single, Single, Single, Single) |
Obsolete.
Creates a scaling matrix, around a pivot point. |
MakeScale(Single, Single) |
Obsolete.
Creates a scaling matrix. |
MakeSkew(Single, Single) |
Obsolete.
Creates a skewing matrix. |
MakeTranslation(Single, Single) |
Obsolete.
Creates a translation matrix. |
MapPoint(Single, Single) |
Applies the matrix to a point. |
MapPoint(SKPoint) |
Applies the matrix to a point. |
MapPoints(SKPoint[], SKPoint[]) |
Applies the matrix to an array of points. |
MapPoints(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) |
Obsolete.
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. |
MapVector(SKPoint) | |
MapVectors(SKPoint[], SKPoint[]) |
Apply the to the array of vectors and return the mapped results.. |
MapVectors(SKPoint[]) |
Applies the matrix to the array of vectors, ignoring translation, and returns the mapped results. |
PostConcat(SKMatrix, SKMatrix) |
Obsolete.
Post-concatenates the matrix to the target matrix. |
PostConcat(SKMatrix, SKMatrix) |
Obsolete.
Post-concatenates the matrix to the target matrix. |
PostConcat(SKMatrix) | |
PreConcat(SKMatrix, SKMatrix) |
Obsolete.
Pre-concatenates the matrix to the target matrix. |
PreConcat(SKMatrix, SKMatrix) |
Obsolete.
Pre-concatenates the matrix to the target matrix. |
PreConcat(SKMatrix) | |
Rotate(SKMatrix, Single, Single, Single) |
Obsolete.
Rotates the specified matrix by the specified radians. |
Rotate(SKMatrix, Single) |
Obsolete.
Rotates the specified matrix by the specified radians. |
RotateDegrees(SKMatrix, Single, Single, Single) |
Obsolete.
Rotates the specified matrix by the specified degrees. |
RotateDegrees(SKMatrix, Single) |
Obsolete.
Rotates the specified matrix by the specified degrees. |
SetScaleTranslate(Single, Single, Single, Single) |
Obsolete.
Obsolete.
Initializes the matrix to be scale + post-translate. |
TryInvert(SKMatrix) |
Attempts to invert the matrix, if possible the inverse matrix contains the result. |
Operators
Equality(SKMatrix, SKMatrix) | |
Inequality(SKMatrix, SKMatrix) |