Matrix Struct

Summary

A 2x3 matrix.
Namespace
Avalonia
Interfaces
Base Types
  • object
  • ValueType
graph BT Type-->Base0["ValueType"] Base0-->Base1["object"] Type-.->Interface0["IEquatable<Matrix>"] Type["Matrix"] class Type type-node

Syntax

public readonly struct Matrix : ValueType, IEquatable<Matrix>

Constructors

Name Summary
Matrix(double, double, double, double, double, double) Initializes a new instance of the Matrix struct.

Properties

Name Value Summary
HasInverse bool
HasInverse Property - returns true if this matrix is invertible, false otherwise.
Identity Matrix
Returns the multiplicative identity matrix.
static
IsIdentity bool
Returns whether the matrix is the identity matrix.
M11 double
The first element of the first row
M12 double
The second element of the first row
M21 double
The first element of the second row
M22 double
The second element of the second row
M31 double
The first element of the third row
M32 double
The second element of the third row

Methods

Name Value Summary
CreateRotation(double) Matrix
Creates a rotation matrix using the given rotation in radians.
static
CreateScale(double, double) Matrix
Creates a scale matrix from the given X and Y components.
static
CreateScale(Vector) Matrix
Creates a scale matrix from the given vector scale.
static
CreateSkew(double, double) Matrix
Creates a skew matrix from the given axis skew angles in radians.
static
CreateTranslation(double, double) Matrix
Creates a translation matrix from the given X and Y components.
static
CreateTranslation(Vector) Matrix
Creates a translation matrix from the given vector.
static
Equals(Matrix) bool
Returns a boolean indicating whether the matrix is equal to the other given matrix.
Equals(object) bool
Returns a boolean indicating whether the given Object is equal to this matrix instance.
GetDeterminant() double
Calculates the determinant for this matrix.
GetHashCode() int
Returns the hash code for this instance.
Invert() Matrix
Inverts the Matrix.
Parse(string) Matrix
Parses a Matrix string.
static
ToRadians(double) double
Converts an angle in degrees to radians.
static
ToString() string
Returns a String representing this matrix instance.
TryDecomposeTransform(Matrix, Matrix.Decomposed) bool
Decomposes given matrix into transform operations.
static
TryInvert(Matrix) bool
Attempts to invert the Matrix.

Operators

Name Value Summary
operator !=(Matrix, Matrix) bool
operator -(Matrix) Matrix
operator *(Matrix, Matrix) Matrix
operator ==(Matrix, Matrix) bool