public void AppendSkewDegrees_WithoutSpecificSkewCenter_SkewIsCenteredAroundImageCenter( int width, int height, float degreesX, float degreesY, float x, float y) { var size = new Size(width, height); TBuilder builder = this.CreateBuilder(); this.AppendSkewDegrees(builder, degreesX, degreesY); Matrix3x2 matrix = TransformUtilities.CreateSkewMatrixDegrees(degreesX, degreesY, size); var position = new Vector2(x, y); var expected = Vector2.Transform(position, matrix); Vector2 actual = this.Execute(builder, new Rectangle(Point.Empty, size), position); Assert.Equal(actual, expected, Comparer); }
/// <summary> /// Appends a centered skew matrix from the give angles in degrees. /// </summary> /// <param name="degreesX">The X angle, in degrees.</param> /// <param name="degreesY">The Y angle, in degrees.</param> /// <returns>The <see cref="AffineTransformBuilder"/>.</returns> public AffineTransformBuilder AppendSkewDegrees(float degreesX, float degreesY) => this.Append(size => TransformUtilities.CreateSkewMatrixDegrees(degreesX, degreesY, size));