SKMatrix44 Class
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 3D, 4x4 matrix.
public class SKMatrix44 : SkiaSharp.SKObject
public struct SKMatrix44 : IEquatable<SkiaSharp.SKMatrix44>
- Inheritance
- Inheritance
-
SKMatrix44
- Implements
Constructors
| Name | Description |
|---|---|
| SKMatrix44() |
Creates a new, uninitialized instance of SKMatrix44. |
| SKMatrix44(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single) |
Initializes a new instance of the SKMatrix44 struct with the specified values. |
| SKMatrix44(SKMatrix) |
Creates a new instance of SKMatrix44 using the values from a SKMatrix instance. |
| SKMatrix44(SKMatrix44, SKMatrix44) |
Creates a new instance of SKMatrix44 using the concatenated values from two other instances. |
| SKMatrix44(SKMatrix44) |
Creates a new instance of SKMatrix44 using the values from another instance. |
Fields
| Name | Description |
|---|---|
| Empty |
Represents an empty matrix with all values set to zero. |
| Identity |
Represents the identity matrix. |
Properties
| Name | Description |
|---|---|
| Handle |
Gets or sets the handle to the underlying native object. (Inherited from SKObject) |
| IgnorePublicDispose |
Gets or sets a value indicating whether the call the public Dispose() should be no-op. (Inherited from SKNativeObject) |
| IsDisposed |
Gets or sets a value indicating whether the object has already been disposed. (Inherited from SKNativeObject) |
| IsInvertible |
Gets whether this matrix is invertible. |
| Item[Int32, Int32] |
Gets or sets a value in the matrix. |
| M00 |
Gets or sets the value at row 0, column 0. |
| M01 |
Gets or sets the value at row 0, column 1. |
| M02 |
Gets or sets the value at row 0, column 2. |
| M03 |
Gets or sets the value at row 0, column 3. |
| M10 |
Gets or sets the value at row 1, column 0. |
| M11 |
Gets or sets the value at row 1, column 1. |
| M12 |
Gets or sets the value at row 1, column 2. |
| M13 |
Gets or sets the value at row 1, column 3. |
| M20 |
Gets or sets the value at row 2, column 0. |
| M21 |
Gets or sets the value at row 2, column 1. |
| M22 |
Gets or sets the value at row 2, column 2. |
| M23 |
Gets or sets the value at row 2, column 3. |
| M30 |
Gets or sets the value at row 3, column 0. |
| M31 |
Gets or sets the value at row 3, column 1. |
| M32 |
Gets or sets the value at row 3, column 2. |
| M33 |
Gets or sets the value at row 3, column 3. |
| Matrix |
Gets the SKMatrix equivalent of the current matrix. |
| OwnsHandle |
Gets or sets a value indicating whether this object owns its handle and should destroy the native object when it is disposed. (Inherited from SKNativeObject) |
| Type |
Gets a bit field describing the transformations the matrix may perform. |
Methods
| Name | Description |
|---|---|
| Add(SKMatrix44, SKMatrix44) |
Adds two matrices and returns the result. |
| Concat(SKMatrix44, SKMatrix44, SKMatrix44) |
Concatenates two matrices into a target matrix. |
| Concat(SKMatrix44, SKMatrix44) |
Concatenates two matrices and returns the result. |
| CreateIdentity() |
Creates a new identity matrix. |
| CreateRotation(Single, Single, Single, Single) |
Creates a new rotation matrix. |
| CreateRotationDegrees(Single, Single, Single, Single) |
Creates a new rotation matrix. |
| CreateScale(Single, Single, Single, Single, Single, Single) |
Creates a 3D scaling matrix with a pivot point. |
| CreateScale(Single, Single, Single) |
Creates a new scale matrix. |
| CreateTranslate(Single, Single, Single) |
Creates a new translation matrix. |
| CreateTranslation(Single, Single, Single) |
Creates a new 3D translation matrix. |
| Determinant() |
Calculates the determinant of the matrix. |
| Dispose() |
Releases all resources used by this SKNativeObject. (Inherited from SKNativeObject) |
| Dispose(Boolean) |
Releases the unmanaged resources used by the SKMatrix44 and optionally releases the managed resources. |
| DisposeInternal() |
Triggers a dispose, ignoring the value of IgnorePublicDispose. (Inherited from SKNativeObject) |
| DisposeManaged() |
Implemented by derived SKObject types to destroy any managed objects. (Inherited from SKObject) |
| DisposeNative() |
Implemented by derived SKObject types to destroy any native objects. |
| DisposeUnownedManaged() |
Implemented by derived SKObject types to dispose managed objects that are not owned by this instance. (Inherited from SKObject) |
| Equal(SKMatrix44, SKMatrix44) |
Determines if the two matrices are equal. |
| Equals(Object) |
Determines whether this matrix is equal to another object. |
| Equals(SKMatrix44) |
Determines whether this matrix is equal to another matrix. |
| FromColumnMajor(ReadOnlySpan<Single>) |
Creates a matrix from values in column-major order. |
| FromColumnMajor(Single[]) |
Creates a new matrix using the values from the column-major array. |
| FromRowMajor(ReadOnlySpan<Single>) |
Creates a matrix from values in row-major order. |
| FromRowMajor(Single[]) |
Creates a new matrix using the values from the row-major array. |
| GetHashCode() |
Returns the hash code for this matrix. |
| Invert() |
Creates an inverted matrix from the current matrix. |
| Invert(SKMatrix44) |
Inverts the current matrix and stores the result in the provided matrix. |
| MapPoint(Single, Single, Single) |
Transforms a 3D point using this matrix. |
| MapPoint(Single, Single) |
Transforms a 2D point using this matrix. |
| MapPoint(SKPoint) |
Applies the matrix to a point. |
| MapPoint(SKPoint3) |
Transforms a 3D point using this matrix. |
| MapPoints(SKPoint[]) |
Applies the matrix to an array of points. |
| MapScalars(Single, Single, Single, Single) |
Applies the matrix to a vector. |
| MapScalars(Single[], Single[]) |
Applies the matrix to a vector. |
| MapScalars(Single[]) |
Applies the matrix to a vector. |
| MapVector2(Single[], Single[]) |
Applies the matrix to a series of [x, y] pairs, returning the [x', y', z', w'] result. |
| MapVector2(Single[]) |
Applies the matrix to a series of [x, y] pairs, returning the [x', y', z', w'] result. |
| Multiply(SKMatrix44, Single) |
Multiplies a matrix by a scalar value. |
| Multiply(SKMatrix44, SKMatrix44) |
Multiplies two matrices and returns the result. |
| Negate(SKMatrix44) |
Negates a matrix by multiplying all elements by -1. |
| PostConcat(SKMatrix44) |
Post-concatenates the current matrix with the specified matrix. |
| PostScale(Single, Single, Single) |
Post-scales the current matrix with the specified scale. |
| PostTranslate(Single, Single, Single) |
Post-translates the current matrix with the specified stranslationale. |
| PreConcat(SKMatrix44) |
Pre-concatenates the matrix with the specified matrix. |
| PreScale(Single, Single, Single) |
Pre-scales the current matrix with the specified scale. |
| Preserves2DAxisAlignment(Single) |
Determines if transforming an axis-aligned square in 2D by this matrix will produce another 2D, axis-aligned square. |
| PreTranslate(Single, Single, Single) |
Pre-translates the current matrix with the specified translation. |
| Set3x3ColumnMajor(Single[]) |
Sets the matrix values from a 3x3 column-major array. |
| Set3x3RowMajor(Single[]) |
Sets the matrix values from a 3x3 row-major array. |
| SetColumnMajor(Single[]) |
Resets the current matrix with the specified column-major values. |
| SetConcat(SKMatrix44, SKMatrix44) |
Reset the current matrix with the values from the concatenation of the specified matrices. |
| SetIdentity() |
Resets the current matrix to identity. |
| SetRotationAbout(Single, Single, Single, Single) |
Resets the current matrix to a rotation matrix. |
| SetRotationAboutDegrees(Single, Single, Single, Single) |
Resets the current matrix to a rotation matrix. |
| SetRotationAboutUnit(Single, Single, Single, Single) |
Resets the current matrix to a rotation matrix, without checking to see if the specified vector is unit-length. |
| SetRowMajor(Single[]) |
Resets the current matrix with the specified row-major values. |
| SetScale(Single, Single, Single) |
Resets the current matrix to a scale matrix. |
| SetTranslate(Single, Single, Single) |
Resets the current matrix to a translation matrix. |
| Subtract(SKMatrix44, SKMatrix44) |
Subtracts two matrices and returns the result. |
| ToColumnMajor() |
Converts the current matrix to a column-major array. |
| ToColumnMajor(Single[]) |
Converts the current matrix to a column-major array. |
| ToColumnMajor(Span<Single>) |
Copies the matrix values to a span in column-major order. |
| ToRowMajor() |
Converts the current matrix to a row-major array. |
| ToRowMajor(Single[]) |
Converts the current matrix to a row-major array. |
| ToRowMajor(Span<Single>) |
Copies the matrix values to a span in row-major order. |
| Transpose() |
Transposes the current matrix. |
| TryInvert(SKMatrix44) |
Attempts to invert the matrix. |
Operators
| Name | Description |
|---|---|
| Addition(SKMatrix44, SKMatrix44) |
Adds two matrices. |
| Equality(SKMatrix44, SKMatrix44) |
Determines whether two matrices are equal. |
| Implicit(Matrix4x4 to SKMatrix44) |
Converts a Matrix4x4 to an SKMatrix44. |
| Implicit(SKMatrix to SKMatrix44) |
Converts an SKMatrix to an SKMatrix44. |
| Implicit(SKMatrix44 to Matrix4x4) |
Converts an SKMatrix44 to a Matrix4x4. |
| Inequality(SKMatrix44, SKMatrix44) |
Determines whether two matrices are not equal. |
| Multiply(SKMatrix44, Single) |
Multiplies a matrix by a scalar value. |
| Multiply(SKMatrix44, SKMatrix44) |
Multiplies two matrices. |
| Subtraction(SKMatrix44, SKMatrix44) |
Subtracts two matrices. |
| UnaryNegation(SKMatrix44) |
Negates a matrix. |
Extension Methods
| Name | Description |
|---|---|
| ToColorSpaceXyz(SKMatrix44) |
Obsolete.
Converts a 4x4 matrix to an XYZ color space transformation matrix. |