From e2e5a752559b76cb7b04ad8d825d9cda8b59fe81 Mon Sep 17 00:00:00 2001 From: Takoooooo Date: Mon, 6 Jun 2022 13:08:14 +0300 Subject: [PATCH] Fix typos in Matrix.cs --- src/Avalonia.Base/Matrix.cs | 72 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/Avalonia.Base/Matrix.cs b/src/Avalonia.Base/Matrix.cs index 5bbc657385..9b44c892fd 100644 --- a/src/Avalonia.Base/Matrix.cs +++ b/src/Avalonia.Base/Matrix.cs @@ -9,14 +9,14 @@ namespace Avalonia /// /// A 3x3 matrix. /// - /// Matrix layout: + /// Matrix layout: /// | 1st col | 2nd col | 3r col | - /// 1st row | scaleX | skrewY | persX | - /// 2nd row | skrewX | scaleY | persY | - /// 3rd row | transX | transY | persZ | + /// 1st row | scaleX | skewY | perspX | + /// 2nd row | skewX | scaleY | perspY | + /// 3rd row | transX | transY | perspZ | /// - /// Note: Skia.SkMatrix uses a transposed layout (where for example skrewX/skrewY and perspp0/tranX are swapped). - /// + /// Note: Skia.SkMatrix uses a transposed layout (where for example skewX/skewY and persp0/transX are swapped). + /// #if !BUILDTASK public #endif @@ -36,18 +36,18 @@ namespace Avalonia /// Initializes a new instance of the struct (equivalent to a 2x3 Matrix without perspective). /// /// The first element of the first row. - /// The second element of the first row. - /// The first element of the second row. + /// The second element of the first row. + /// The first element of the second row. /// The second element of the second row. /// The first element of the third row. /// The second element of the third row. public Matrix( double scaleX, - double skrewY, - double skrewX, + double skewY, + double skewX, double scaleY, double offsetX, - double offsetY) : this( scaleX, skrewY, 0, skrewX, scaleY, 0, offsetX, offsetY, 1) + double offsetY) : this( scaleX, skewY, 0, skewX, scaleY, 0, offsetX, offsetY, 1) { } @@ -57,34 +57,34 @@ namespace Avalonia /// Initializes a new instance of the struct. /// /// The first element of the first row. - /// The second element of the first row. - /// The third element of the first row. - /// The first element of the second row. + /// The second element of the first row. + /// The third element of the first row. + /// The first element of the second row. /// The second element of the second row. - /// The third element of the second row. + /// The third element of the second row. /// The first element of the third row. /// The second element of the third row. - /// The third element of the third row. + /// The third element of the third row. public Matrix( double scaleX, - double skrewY, - double persX, - double skrewX, + double skewY, + double perspX, + double skewX, double scaleY, - double persY, + double perspY, double offsetX, double offsetY, - double persZ) + double perspZ) { _m11 = scaleX; - _m12 = skrewY; - _m13 = persX; - _m21 = skrewX; + _m12 = skewY; + _m13 = perspX; + _m21 = skewX; _m22 = scaleY; - _m23 = persY; + _m23 = perspY; _m31 = offsetX; _m32 = offsetY; - _m33 = persZ; + _m33 = perspZ; } /// @@ -111,17 +111,17 @@ namespace Avalonia public double M11 => _m11; /// - /// The second element of the first row (skrewY). + /// The second element of the first row (skewY). /// public double M12 => _m12; /// - /// The third element of the first row (persX: input x-axis perspective factor). + /// The third element of the first row (perspX: input x-axis perspective factor). /// public double M13 => _m13; /// - /// The first element of the second row (skrewX). + /// The first element of the second row (skewX). /// public double M21 => _m21; @@ -131,7 +131,7 @@ namespace Avalonia public double M22 => _m22; /// - /// The third element of the second row (persY: input y-axis perspective factor). + /// The third element of the second row (perspY: input y-axis perspective factor). /// public double M23 => _m23; @@ -146,7 +146,7 @@ namespace Avalonia public double M32 => _m32; /// - /// The third element of the third row (persZ: perspective scale factor). + /// The third element of the third row (perspZ: perspective scale factor). /// public double M33 => _m33; @@ -481,7 +481,7 @@ namespace Avalonia /// /// Parses a string. /// - /// Six or nine comma-delimited double values (m11, m12, m21, m22, offsetX, offsetY[, persX, persY, persZ]) that describe the new + /// Six or nine comma-delimited double values (m11, m12, m21, m22, offsetX, offsetY[, perspX, perspY, perspZ]) that describe the new /// The . public static Matrix Parse(string s) { @@ -497,11 +497,11 @@ namespace Avalonia var v4 = tokenizer.ReadDouble(); var v5 = tokenizer.ReadDouble(); var v6 = tokenizer.ReadDouble(); - var pers = tokenizer.TryReadDouble(out var v7); - pers = pers && tokenizer.TryReadDouble(out v8); - pers = pers && tokenizer.TryReadDouble(out v9); + var persp = tokenizer.TryReadDouble(out var v7); + persp = persp && tokenizer.TryReadDouble(out v8); + persp = persp && tokenizer.TryReadDouble(out v9); - if (pers) + if (persp) return new Matrix(v1, v2, v7, v3, v4, v8, v5, v6, v9); else return new Matrix(v1, v2, v3, v4, v5, v6);