Browse Source

Remove comment to disable Jetbrains formatter from code

pull/2748/head
Socolin 2 years ago
parent
commit
81026ba73c
  1. 22
      src/ImageSharp/Common/Helpers/QuadDistortionHelper.cs

22
src/ImageSharp/Common/Helpers/QuadDistortionHelper.cs

@ -35,17 +35,16 @@ internal static class QuadDistortionHelper
PointF q3 = bottomRight; PointF q3 = bottomRight;
PointF q4 = bottomLeft; PointF q4 = bottomLeft;
// @formatter:off
float[][] matrixData = float[][] matrixData =
[ [
[p1.X, p1.Y, 1, 0, 0, 0, -p1.X * q1.X, -p1.Y * q1.X], [p1.X, p1.Y, 1, 0, 0, 0, -p1.X * q1.X, -p1.Y * q1.X],
[0, 0, 0, p1.X, p1.Y, 1, -p1.X * q1.Y, -p1.Y * q1.Y], [0, 0, 0, p1.X, p1.Y, 1, -p1.X * q1.Y, -p1.Y * q1.Y],
[p2.X, p2.Y, 1, 0, 0, 0, -p2.X * q2.X, -p2.Y * q2.X], [p2.X, p2.Y, 1, 0, 0, 0, -p2.X * q2.X, -p2.Y * q2.X],
[0, 0, 0, p2.X, p2.Y, 1, -p2.X * q2.Y, -p2.Y * q2.Y], [0, 0, 0, p2.X, p2.Y, 1, -p2.X * q2.Y, -p2.Y * q2.Y],
[p3.X, p3.Y, 1, 0, 0, 0, -p3.X * q3.X, -p3.Y * q3.X], [p3.X, p3.Y, 1, 0, 0, 0, -p3.X * q3.X, -p3.Y * q3.X],
[0, 0, 0, p3.X, p3.Y, 1, -p3.X * q3.Y, -p3.Y * q3.Y], [0, 0, 0, p3.X, p3.Y, 1, -p3.X * q3.Y, -p3.Y * q3.Y],
[p4.X, p4.Y, 1, 0, 0, 0, -p4.X * q4.X, -p4.Y * q4.X], [p4.X, p4.Y, 1, 0, 0, 0, -p4.X * q4.X, -p4.Y * q4.X],
[0, 0, 0, p4.X, p4.Y, 1, -p4.X * q4.Y, -p4.Y * q4.Y], [0, 0, 0, p4.X, p4.Y, 1, -p4.X * q4.Y, -p4.Y * q4.Y],
]; ];
float[] b = float[] b =
@ -62,15 +61,14 @@ internal static class QuadDistortionHelper
GaussianEliminationSolver.Solve(matrixData, b); GaussianEliminationSolver.Solve(matrixData, b);
#pragma warning disable SA1117 #pragma warning disable SA1117
Matrix4x4 projectionMatrix = new( Matrix4x4 projectionMatrix = new(
b[0], b[3], 0, b[6], b[0], b[3], 0, b[6],
b[1], b[4], 0, b[7], b[1], b[4], 0, b[7],
0, 0, 1, 0, 0, 0, 1, 0,
b[2], b[5], 0, 1); b[2], b[5], 0, 1);
#pragma warning restore SA1117 #pragma warning restore SA1117
// @formatter:on
return projectionMatrix; return projectionMatrix;
} }
} }

Loading…
Cancel
Save