Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBobSquarePants committed Oct 16, 2024
1 parent 5792bb2 commit 514d039
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/ImageSharp/Common/Helpers/GaussianEliminationSolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace SixLabors.ImageSharp.Common.Helpers;
/// <summary>
/// Represents a solver for systems of linear equations using the Gaussian Elimination method.
/// This class applies Gaussian Elimination to transform the matrix into row echelon form and then performs back substitution to find the solution vector.
/// This implementation is based on: https://www.algorithm-archive.org/contents/gaussian_elimination/gaussian_elimination.html
/// This implementation is based on: <see href="https://www.algorithm-archive.org/contents/gaussian_elimination/gaussian_elimination.html"/>
/// </summary>
internal static class GaussianEliminationSolver
{
Expand Down
4 changes: 2 additions & 2 deletions src/ImageSharp/Common/Helpers/QuadDistortionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal static class QuadDistortionHelper
/// <returns>The computed projection matrix for the quad distortion.</returns>
/// <remarks>
/// This method is based on the algorithm described in the following article:
/// https://blog.mbedded.ninja/mathematics/geometry/projective-transformations/
/// <see href="https://blog.mbedded.ninja/mathematics/geometry/projective-transformations/"/>
/// </remarks>
public static Matrix4x4 ComputeQuadDistortMatrix(Rectangle rectangle, PointF topLeft, PointF topRight, PointF bottomRight, PointF bottomLeft)
{
Expand Down Expand Up @@ -65,7 +65,7 @@ public static Matrix4x4 ComputeQuadDistortMatrix(Rectangle rectangle, PointF top
Matrix4x4 projectionMatrix = new(
b[0], b[3], 0, b[6],
b[1], b[4], 0, b[7],
0, 0, 1, 0,
0, 0, 1, 0,
b[2], b[5], 0, 1);
#pragma warning restore SA1117

Expand Down
9 changes: 2 additions & 7 deletions src/ImageSharp/Processing/ProjectiveTransformBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,7 @@ public ProjectiveTransformBuilder AppendTranslation(Vector2 position)
/// <param name="bottomLeft">The bottom-left corner point of the distorted quad.</param>
/// <returns>The <see cref="ProjectiveTransformBuilder"/>.</returns>
public ProjectiveTransformBuilder PrependQuadDistortion(PointF topLeft, PointF topRight, PointF bottomRight, PointF bottomLeft)
=> this.Prepend(
size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft),
size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft));
=> this.Prepend(size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft));

/// <summary>
/// Appends a quad distortion matrix using the specified corner points.
Expand All @@ -302,10 +300,7 @@ public ProjectiveTransformBuilder PrependQuadDistortion(PointF topLeft, PointF t
/// <param name="bottomLeft">The bottom-left corner point of the distorted quad.</param>
/// <returns>The <see cref="ProjectiveTransformBuilder"/>.</returns>
public ProjectiveTransformBuilder AppendQuadDistortion(PointF topLeft, PointF topRight, PointF bottomRight, PointF bottomLeft)
=> this.Append(
size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft),
size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft)
);
=> this.Append(size => QuadDistortionHelper.ComputeQuadDistortMatrix(new Rectangle(Point.Empty, size), topLeft, topRight, bottomRight, bottomLeft));

/// <summary>
/// Prepends a raw matrix.
Expand Down

0 comments on commit 514d039

Please sign in to comment.