6 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);
System.Drawing.Common.Tests (3)
System\Drawing\Drawing2D\MatrixTests.Core.cs (2)
14Matrix3x2 matrix3X2 = new(m11, m12, m21, m22, dx, dy); 28Matrix3x2 matrix3X2 = new(m11, m12, m21, m22, dx, dy);
System\Drawing\GraphicsTests.Core.cs (1)
18Matrix3x2 matrix = new(123, 24, 82, 16, 47, 30);
230 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);
netstandard (1)
netstandard.cs (1)
1333[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix3x2))]
System.Drawing.Common.Tests (14)
System\Drawing\Drawing2D\MatrixTests.Core.cs (2)
14Matrix3x2 matrix3X2 = new(m11, m12, m21, m22, dx, dy); 28Matrix3x2 matrix3X2 = new(m11, m12, m21, m22, dx, dy);
System\Drawing\Graphics_GetContextTests.Core.cs (5)
47graphics.TransformElements = Matrix3x2.CreateTranslation(1, 2); 64graphics.TransformElements = Matrix3x2.CreateTranslation(1, 2); 82graphics.TransformElements = Matrix3x2.CreateTranslation(1, 2); 102graphics.TransformElements = Matrix3x2.CreateTranslation(1, 2); 122graphics.TransformElements = Matrix3x2.CreateTranslation(1, 2);
System\Drawing\GraphicsTests.Core.cs (7)
11private static Matrix3x2 s_testMatrix = Matrix3x2.CreateRotation(45) * Matrix3x2.CreateScale(2) * Matrix3x2.CreateTranslation(new Vector2(10, 20)); 18Matrix3x2 matrix = new(123, 24, 82, 16, 47, 30); 31Assert.Throws<InvalidOperationException>(() => graphics.TransformElements = Matrix3x2.Identity); 47AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformElements = Matrix3x2.Identity);
System.Numerics (1)
System.Numerics.cs (1)
6[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix3x2))]
System.Numerics.Vectors (1)
artifacts\obj\System.Numerics.Vectors\Debug\net10.0\System.Numerics.Vectors.Forwards.cs (1)
3[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix3x2))]
System.Private.CoreLib (95)
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix3x2.cs (81)
14public partial struct Matrix3x2 : IEquatable<Matrix3x2> 53/// <summary>Initializes a <see cref="Matrix3x2"/> using the specified elements.</summary> 73public static Matrix3x2 Identity 332/// <remarks>The <see cref="op_Addition" /> method defines the operation of the addition operator for <see cref="Matrix3x2" /> objects.</remarks> 334public static Matrix3x2 operator +(Matrix3x2 value1, Matrix3x2 value2) 343public static bool operator ==(Matrix3x2 value1, Matrix3x2 value2) 351public static bool operator !=(Matrix3x2 value1, Matrix3x2 value2) 358/// <remarks>The <see cref="Matrix3x2.op_Multiply" /> method defines the operation of the multiplication operator for <see cref="Matrix3x2" /> objects.</remarks> 359public static Matrix3x2 operator *(Matrix3x2 value1, Matrix3x2 value2) 366/// <remarks>The <see cref="Matrix3x2.op_Multiply" /> method defines the operation of the multiplication operator for <see cref="Matrix3x2" /> objects.</remarks> 368public static Matrix3x2 operator *(Matrix3x2 value1, float value2) 375/// <remarks>The <see cref="Subtract" /> method defines the operation of the subtraction operator for <see cref="Matrix3x2" /> objects.</remarks> 377public static Matrix3x2 operator -(Matrix3x2 value1, Matrix3x2 value2) 383/// <altmember cref="Negate(Matrix3x2)" /> 385public static Matrix3x2 operator -(Matrix3x2 value) 393public static Matrix3x2 Add(Matrix3x2 value1, Matrix3x2 value2) 396/// <summary>Creates a <see cref="Matrix3x2" /> whose 6 elements are set to the specified value.</summary> 398/// <returns>A <see cref="Matrix3x2" /> whose 6 elements are set to <paramref name="value" />.</returns> 400public static Matrix3x2 Create(float value) => Create(Vector2.Create(value)); 402/// <summary>Creates a <see cref="Matrix3x2" /> whose 3 rows are set to the specified value.</summary> 404/// <returns>A <see cref="Matrix3x2" /> whose 3 rows are set to <paramref name="value" />.</returns> 406public static Matrix3x2 Create(Vector2 value) => Create(value, value, value); 408/// <summary>Creates a <see cref="Matrix3x2" /> from the specified rows.</summary> 412/// <returns>A <see cref="Matrix3x2" /> whose rows are set to the specified values.</returns> 414public static Matrix3x2 Create(Vector2 x, Vector2 y, Vector2 z) 416Unsafe.SkipInit(out Matrix3x2 result); 425/// <summary>Creates a <see cref="Matrix3x2" /> from the specified elements.</summary> 432/// <returns>A <see cref="Matrix3x2" /> whose elements are set to the specified values.</returns> 434public static Matrix3x2 Create(float m11, float m12, 445public static Matrix3x2 CreateRotation(float radians) 452public static Matrix3x2 CreateRotation(float radians, Vector2 centerPoint) 458public static Matrix3x2 CreateScale(Vector2 scales) 465public static Matrix3x2 CreateScale(float xScale, float yScale) 473public static Matrix3x2 CreateScale(float xScale, float yScale, Vector2 centerPoint) 480public static Matrix3x2 CreateScale(Vector2 scales, Vector2 centerPoint) 486public static Matrix3x2 CreateScale(float scale) 493public static Matrix3x2 CreateScale(float scale, Vector2 centerPoint) 500public static Matrix3x2 CreateSkew(float radiansX, float radiansY) 508public static Matrix3x2 CreateSkew(float radiansX, float radiansY, Vector2 centerPoint) 514public static Matrix3x2 CreateTranslation(Vector2 position) 521public static Matrix3x2 CreateTranslation(float xPosition, float yPosition) 528public static bool Invert(Matrix3x2 matrix, out Matrix3x2 result) 540public static Matrix3x2 Lerp(Matrix3x2 matrix1, Matrix3x2 matrix2, float amount) 548public static Matrix3x2 Multiply(Matrix3x2 value1, Matrix3x2 value2) 556public static Matrix3x2 Multiply(Matrix3x2 value1, float value2) 563public static Matrix3x2 Negate(Matrix3x2 value) 571public static Matrix3x2 Subtract(Matrix3x2 value1, Matrix3x2 value2) 577/// <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> 582/// <summary>Returns a value that indicates whether this instance and another <see cref="Matrix3x2" /> are equal.</summary> 587public readonly bool Equals(Matrix3x2 other) 628/// <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> 632/// <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> 639public readonly Matrix3x2 WithElement(int row, int column, float value) 641Matrix3x2 result = this; 646/// <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> 649/// <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> 652public readonly Matrix3x2 WithRow(int index, Vector2 value) 654Matrix3x2 result = this;
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix3x2.Impl.cs (5)
20internal ref Impl AsImpl() => ref Unsafe.As<Matrix3x2, Impl>(ref this); 24internal readonly ref readonly Impl AsROImpl() => ref Unsafe.As<Matrix3x2, Impl>(ref Unsafe.AsRef(in this)); 30public ref Matrix3x2 AsM3x2() => ref Unsafe.As<Impl, Matrix3x2>(ref this); 401=> (obj is Matrix3x2 other) && Equals(in other.AsImpl());
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.cs (7)
123/// <summary>Initializes a <see cref="Matrix4x4" /> using the specified <see cref="Matrix3x2" />.</summary> 124/// <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> 126public Matrix4x4(Matrix3x2 value) 508/// <summary>Creates a <see cref="Matrix4x4" /> from the specified <see cref="Matrix3x2" />.</summary> 509/// <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> 513public static Matrix4x4 Create(Matrix3x2 value) => Create( 545/// <summary>Creates a <see cref="Matrix3x2" /> from the specified elements.</summary>
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (2)
905public static Vector2 Transform(Vector2 position, Matrix3x2 matrix) 931public static Vector2 TransformNormal(Vector2 normal, Matrix3x2 matrix)
System.Windows.Forms (1)
System\Windows\Forms\Rendering\ScreenDcCache.cs (1)
113Matrix3x2 matrix = default;
System.Windows.Forms.Primitives.TestUtilities (12)
DeviceContextState.cs (3)
35Matrix3x2 transform = default; 68public Matrix3x2 Transform { get => _currentState.Transform; set => _currentState.Transform = value; } 85public Matrix3x2 Transform { get; set; }
Extensions\GdiExtensions.cs (1)
14public static Point TransformPoint(in this Matrix3x2 transform, Point point)
Metafiles\DataHelpers.cs (1)
29public static unsafe Point[] PointArray(Matrix3x2 transform, params int[] values)
Metafiles\EmfScope.cs (1)
185state.Transform = Matrix3x2.Identity;
Metafiles\RecordTypes\EMRBITBLT.cs (1)
24public Matrix3x2 xformSrc; // Source DC transform
Metafiles\RecordTypes\EMRMODIFYWORLDTRANSFORM.cs (1)
15public Matrix3x2 xform;
Metafiles\RecordTypes\EMRSETWORLDTRANSFORM.cs (1)
15public Matrix3x2 xform;
Metafiles\Validators\State.cs (1)
27internal static IStateValidator Transform(Matrix3x2 transform) => new TransformValidator(transform);
Metafiles\Validators\TransformValidator.cs (2)
12private readonly Matrix3x2 _transform; 13public TransformValidator(Matrix3x2 transform) => _transform = transform;
System.Windows.Forms.Tests (24)
System\Windows\Forms\ControlPaintTests.Rendering.cs (20)
47Matrix3x2 oneSixteenth = Matrix3x2.CreateScale(0.0625f); 48Matrix3x2 times16 = Matrix3x2.CreateScale(16.0f); 107Matrix3x2 oneSixteenth = Matrix3x2.CreateScale(0.0625f); 108Matrix3x2 times16 = Matrix3x2.CreateScale(16.0f); 184Matrix3x2 oneSixteenth = Matrix3x2.CreateScale(0.0625f); 185Matrix3x2 times16 = Matrix3x2.CreateScale(16.0f); 258Matrix3x2 oneSixteenth = Matrix3x2.CreateScale(0.0625f); 259Matrix3x2 times16 = Matrix3x2.CreateScale(16.0f); 329Matrix3x2 oneSixteenth = Matrix3x2.CreateScale(0.0625f); 357Matrix3x2 oneSixteenth = Matrix3x2.CreateScale(0.0625f);
System\Windows\Forms\DataGridViewTests.Rendering.cs (4)
44Matrix3x2 oneSixteenth = Matrix3x2.CreateScale(0.0625f); 45Matrix3x2 times16 = Matrix3x2.CreateScale(16.0f);