3 instantiations of Matrix3x2
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
102P12 = new Matrix3x2(1, 2, 3, 4, 5, 6),
Microsoft.Maui.Controls (1)
Shapes\MatrixExtensions.cs (1)
23 return new Matrix3x2
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (1)
src\Graphics\src\Graphics\Platforms\Windows\PlatformCanvasState.cs (1)
134 Matrix = new Matrix3x2(prototype.Matrix.M11, prototype.Matrix.M12, prototype.Matrix.M21, prototype.Matrix.M22, prototype.Matrix.M31, prototype.Matrix.M32);
189 references to Matrix3x2
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesSpecialTypesExtensions.cs (1)
29public Matrix3x2 P12 { get; set; }
Microsoft.Maui (2)
Graphics\ShapeDrawable.cs (2)
35 internal Matrix3x2? RenderTransform { get; set; } 47 public void UpdateRenderTransform(Matrix3x2? renderTransform)
Microsoft.Maui.Controls (2)
Shapes\MatrixExtensions.cs (2)
8 public static Matrix ToMatrix(this Matrix3x2 matrix3x2) 21 public static Matrix3x2 ToMatrix3X2(this Matrix matrix)
Microsoft.Maui.Graphics (47)
AbstractCanvas.cs (12)
34 protected abstract void PlatformConcatenateTransform(Matrix3x2 transform); 272 var transform = _currentState.Transform; 273 transform = Matrix3x2.CreateTranslation(x, y) * transform; 274 transform = Matrix3x2.CreateRotation(radians) * transform; 275 transform = Matrix3x2.CreateTranslation(-x, -y) * transform; 285 var transform = _currentState.Transform; 286 transform = Matrix3x2.CreateRotation(radians) * transform; 294 var transform = _currentState.Transform; 295 transform = Matrix3x2.CreateScale(fx, fy) * transform; 303 var transform = _currentState.Transform; 304 transform = Matrix3x2.CreateTranslation(tx, ty) * transform; 310 public void ConcatenateTransform(Matrix3x2 transform)
CanvasState.cs (4)
12 private Matrix3x2 _transform = Matrix3x2.Identity; 17 public Matrix3x2 Transform 56 protected static float GetLengthScale(Matrix3x2 matrix) => matrix.GetLengthScale();
ICanvas.cs (1)
297 public void ConcatenateTransform(Matrix3x2 transform);
Matrix3x2Extensions.cs (21)
12 public static bool IsZero(this in Matrix3x2 matrix) 29 public static bool IsFinite(this in Matrix3x2 matrix) 51 public static Vector2 GetScale(this in Matrix3x2 matrix) 60 public static float GetRotation(this in Matrix3x2 matrix) 65 public static Vector2 GetTranslation(this in Matrix3x2 matrix) 70 public static Matrix3x2 WithScale(this Matrix3x2 matrix, Vector2 scale) 89 public static Matrix3x2 WithoutScale(this in Matrix3x2 matrix) 94 public static Matrix3x2 WithRotation(this in Matrix3x2 matrix, float radians) 101 public static Matrix3x2 WithoutRotation(this in Matrix3x2 matrix) 108 public static Matrix3x2 WithTranslation(this Matrix3x2 matrix, Vector2 translation) 129 internal static Matrix3x2 CreateMatrix3x2(Vector2 scale, float rotation, Vector2 translation) 131 var m = Matrix3x2.CreateRotation(rotation); 141 public static float GetLengthScale(this in Matrix3x2 matrix) 148 public static void CopyTo(this in Matrix3x2 matrix, float[] dst, int offset = 0, int count = 6) 163 public static void DeconstructScales(this in Matrix3x2 value, out float scale, out float scalex, out float scaley)
PathExtensions.cs (4)
71 var transform = Matrix3x2.CreateScale(scale); 82 var transform = Matrix3x2.CreateScale(xScale, yScale);
PathF.cs (1)
931 public void Transform(Matrix3x2 transform)
PictureCanvas.cs (1)
228 public void ConcatenateTransform(Matrix3x2 transform)
PointF.cs (1)
72 public PointF TransformBy(in Matrix3x2 transform)
ScalingCanvas.cs (1)
225 public void ConcatenateTransform(Matrix3x2 transform)
SizeF.cs (1)
41 public SizeF TransformNormalBy(in Matrix3x2 transform)
Microsoft.Maui.Graphics.Skia (2)
SKGraphicsExtensions.cs (1)
79 public static SKMatrix AsMatrix(this in Matrix3x2 transform)
SkiaCanvas.cs (1)
776 protected override void PlatformConcatenateTransform(Matrix3x2 transform)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (27)
src\Graphics\src\Graphics\Platforms\Windows\GraphicsExtensions.cs (13)
71 static Matrix3x2 Scale(this Matrix3x2 target, float sx, float sy) 73 return Matrix3x2.Multiply(Matrix3x2.CreateScale(sx, sy), target); 84 static Matrix3x2 Translate(this Matrix3x2 target, float dx, float dy) 86 return Matrix3x2.Multiply(Matrix3x2.CreateTranslation(dx, dy), target); 97 static Matrix3x2 Rotate(this Matrix3x2 target, float radians) 99 Matrix3x2 vMatrix = Matrix3x2.Multiply(Matrix3x2.CreateRotation(radians), target);
src\Graphics\src\Graphics\Platforms\Windows\PlatformCanvas.cs (3)
706 protected override void PlatformConcatenateTransform(Matrix3x2 transform) 820 _session.Transform = Matrix3x2.Identity; 845 _session.Transform = Matrix3x2.Identity;
src\Graphics\src\Graphics\Platforms\Windows\PlatformCanvasState.cs (11)
81 public Matrix3x2 Matrix { get; private set; } 162 Matrix = Matrix3x2.Identity; 447 public Matrix3x2 AppendTranslate(float tx, float ty) 454 public Matrix3x2 AppendConcatenateTransform(Matrix3x2 transform) 456 return Matrix = Matrix3x2.Multiply(Matrix, transform); 459 public Matrix3x2 AppendScale(float tx, float ty) 466 public Matrix3x2 AppendRotate(float aAngle) 473 public Matrix3x2 AppendRotate(float aAngle, float x, float y) 498 _layerMask = _layerBounds.CombineWith(clipGeometry, Matrix3x2.Identity, CanvasGeometryCombine.Intersect); 536 _layerMask = _layerBounds.CombineWith(_layerClipBounds, Matrix3x2.Identity, CanvasGeometryCombine.Exclude);
Microsoft.Private.Windows.Core (3)
Windows\Win32\Graphics\Gdi\HDC.cs (3)
20internal Matrix3x2 GetWorldTransform() 24return Unsafe.As<XFORM, Matrix3x2>(ref matrix); 28return Matrix3x2.Identity;
netstandard (1)
netstandard.cs (1)
1333[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix3x2))]
System.Numerics (1)
System.Numerics.cs (1)
6[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix3x2))]
System.Numerics.Vectors (1)
src\runtime\artifacts\obj\System.Numerics.Vectors\Release\net11.0\System.Numerics.Vectors.Forwards.cs (1)
7[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix3x2))]
System.Private.CoreLib (98)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix3x2.cs (86)
15public partial struct Matrix3x2 : IEquatable<Matrix3x2> 35internal ref Impl AsImpl() => ref Unsafe.As<Matrix3x2, Impl>(ref this); 39internal readonly ref readonly Impl AsROImpl() => ref Unsafe.As<Matrix3x2, Impl>(ref Unsafe.AsRef(in this)); 45public ref Matrix3x2 AsM3x2() => ref Unsafe.As<Impl, Matrix3x2>(ref this); 76/// <summary>Initializes a <see cref="Matrix3x2"/> using the specified elements.</summary> 97public static Matrix3x2 Identity 369/// <remarks>The <see cref="op_Addition" /> method defines the operation of the addition operator for <see cref="Matrix3x2" /> objects.</remarks> 371public static Matrix3x2 operator +(Matrix3x2 value1, Matrix3x2 value2) 391public static bool operator ==(Matrix3x2 value1, Matrix3x2 value2) 406public static bool operator !=(Matrix3x2 value1, Matrix3x2 value2) 420/// <remarks>The <see cref="Matrix3x2.op_Multiply" /> method defines the operation of the multiplication operator for <see cref="Matrix3x2" /> objects.</remarks> 421public static Matrix3x2 operator *(Matrix3x2 value1, Matrix3x2 value2) 435static Vector128<float> Transform2x2(Vector128<float> position, in Matrix3x2.Impl matrix) 446/// <remarks>The <see cref="Matrix3x2.op_Multiply" /> method defines the operation of the multiplication operator for <see cref="Matrix3x2" /> objects.</remarks> 448public static Matrix3x2 operator *(Matrix3x2 value1, float value2) 465/// <remarks>The <see cref="Subtract" /> method defines the operation of the subtraction operator for <see cref="Matrix3x2" /> objects.</remarks> 467public static Matrix3x2 operator -(Matrix3x2 value1, Matrix3x2 value2) 484/// <altmember cref="Negate(Matrix3x2)" /> 486public static Matrix3x2 operator -(Matrix3x2 value) 504public static Matrix3x2 Add(Matrix3x2 value1, Matrix3x2 value2) => value1 + value2; 506/// <summary>Creates a <see cref="Matrix3x2" /> whose 6 elements are set to the specified value.</summary> 508/// <returns>A <see cref="Matrix3x2" /> whose 6 elements are set to <paramref name="value" />.</returns> 510public static Matrix3x2 Create(float value) 523/// <summary>Creates a <see cref="Matrix3x2" /> whose 3 rows are set to the specified value.</summary> 525/// <returns>A <see cref="Matrix3x2" /> whose 3 rows are set to <paramref name="value" />.</returns> 527public static Matrix3x2 Create(Vector2 value) 538/// <summary>Creates a <see cref="Matrix3x2" /> from the specified rows.</summary> 542/// <returns>A <see cref="Matrix3x2" /> whose rows are set to the specified values.</returns> 544public static Matrix3x2 Create(Vector2 x, Vector2 y, Vector2 z) 555/// <summary>Creates a <see cref="Matrix3x2" /> from the specified elements.</summary> 562/// <returns>A <see cref="Matrix3x2" /> whose elements are set to the specified values.</returns> 564public static Matrix3x2 Create(float m11, float m12, 581public static Matrix3x2 CreateRotation(float radians) 636public static Matrix3x2 CreateRotation(float radians, Vector2 centerPoint) 692public static Matrix3x2 CreateScale(Vector2 scales) 708public static Matrix3x2 CreateScale(float xScale, float yScale) 725public static Matrix3x2 CreateScale(float xScale, float yScale, Vector2 centerPoint) 741public static Matrix3x2 CreateScale(Vector2 scales, Vector2 centerPoint) 756public static Matrix3x2 CreateScale(float scale) 772public static Matrix3x2 CreateScale(float scale, Vector2 centerPoint) 788public static Matrix3x2 CreateSkew(float radiansX, float radiansY) 805public static Matrix3x2 CreateSkew(float radiansX, float radiansY, Vector2 centerPoint) 826public static Matrix3x2 CreateTranslation(Vector2 position) 842public static Matrix3x2 CreateTranslation(float xPosition, float yPosition) 857public static bool Invert(Matrix3x2 matrix, out Matrix3x2 result) 899public static Matrix3x2 Lerp(Matrix3x2 matrix1, Matrix3x2 matrix2, float amount) 918public static Matrix3x2 Multiply(Matrix3x2 value1, Matrix3x2 value2) => value1 * value2; 925public static Matrix3x2 Multiply(Matrix3x2 value1, float value2) => value1 * value2; 931public static Matrix3x2 Negate(Matrix3x2 value) => -value; 938public static Matrix3x2 Subtract(Matrix3x2 value1, Matrix3x2 value2) => value1 - value2; 943/// <remarks>The current instance and <paramref name="obj" /> are equal if <paramref name="obj" /> is a <see cref="Matrix3x2" /> object and the corresponding elements of each matrix are equal.</remarks> 946=> (obj is Matrix3x2 other) && Equals(other); 948/// <summary>Returns a value that indicates whether this instance and another <see cref="Matrix3x2" /> are equal.</summary> 953public readonly bool Equals(Matrix3x2 other) 1026/// <summary>Creates a new <see cref="Matrix3x2"/> with the element at the specified row and column set to the given value and the remaining elements set to the same value as that in the current matrix.</summary> 1030/// <returns>A <see cref="Matrix3x2" /> with the value of the element at index: [<paramref name="row"/>, <paramref name="column"/>] set to <paramref name="value" /> and the remaining elements set to the same value as that in the current matrix.</returns> 1037public readonly Matrix3x2 WithElement(int row, int column, float value) 1039Matrix3x2 result = this; 1044/// <summary>Creates a new <see cref="Matrix3x2"/> with the row at the specified index set to the given value and the remaining rows set to the same value as that in the current matrix.</summary> 1047/// <returns>A <see cref="Matrix3x2" /> with the value of the row at index: [<paramref name="index"/>] set to <paramref name="value" /> and the remaining rows set to the same value as that in the current matrix.</returns> 1050public readonly Matrix3x2 WithRow(int index, Vector2 value) 1052Matrix3x2 result = this;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.cs (8)
153/// <summary>Initializes a <see cref="Matrix4x4" /> using the specified <see cref="Matrix3x2" />.</summary> 154/// <param name="value">The <see cref="Matrix3x2" /> to assign to the first two elements of <see cref="X" />, <see cref="Y" />, and <see cref="W" />.</param> 157public Matrix4x4(Matrix3x2 value) 637/// <summary>Creates a <see cref="Matrix4x4" /> from the specified <see cref="Matrix3x2" />.</summary> 638/// <param name="value">The <see cref="Matrix3x2" /> to assign to the first two elements of <see cref="X" />, <see cref="Y" />, and <see cref="W" />.</param> 642public static Matrix4x4 Create(Matrix3x2 value) 644ref readonly Matrix3x2.Impl impl = ref value.AsImpl(); 693/// <summary>Creates a <see cref="Matrix3x2" /> from the specified elements.</summary>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (4)
955public static Vector2 Transform(Vector2 position, Matrix3x2 matrix) => Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector2(); 958internal static Vector128<float> Transform(Vector128<float> position, in Matrix3x2.Impl matrix) 995public static Vector2 TransformNormal(Vector2 normal, Matrix3x2 matrix) => TransformNormal(normal.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector2(); 998internal static Vector128<float> TransformNormal(Vector128<float> normal, in Matrix3x2.Impl matrix)
System.Private.Windows.Core (3)
Windows\Win32\Graphics\Gdi\HDC.cs (3)
20internal Matrix3x2 GetWorldTransform() 24return Unsafe.As<XFORM, Matrix3x2>(ref matrix); 28return Matrix3x2.Identity;
System.Windows.Forms (1)
System\Windows\Forms\Rendering\ScreenDcCache.cs (1)
113Matrix3x2 matrix = default;