Commit b64b4a8f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

undo the "cosmetic changes" of 2005-03-20. Fixes bug #300269.

2005-04-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-transform-utils.c
	(gimp_transform_matrix_perspective): undo the "cosmetic changes"
	of 2005-03-20. Fixes bug #300269.
parent 5d300d57
2005-04-12 Michael Natterer <mitch@gimp.org>
* app/core/gimp-transform-utils.c
(gimp_transform_matrix_perspective): undo the "cosmetic changes"
of 2005-03-20. Fixes bug #300269.
2005-04-12 Raphaël Quinet <raphael@gimp.org>
* configure.in: updated test for libjpeg so that it requires
......
......@@ -255,20 +255,11 @@ gimp_transform_matrix_perspective (GimpMatrix3 *matrix,
trafo.coeff[1][2] = t_y1;
trafo.coeff[2][0] = 0.0;
trafo.coeff[2][1] = 0.0;
trafo.coeff[2][2] = 1.0;
}
else
{
gdouble det1, det2;
trafo.coeff[0][0] = t_x2 - t_x1 + trafo.coeff[2][0] * t_x2;
trafo.coeff[0][1] = t_x3 - t_x1 + trafo.coeff[2][1] * t_x3;
trafo.coeff[0][2] = t_x1;
trafo.coeff[1][0] = t_y2 - t_y1 + trafo.coeff[2][0] * t_y2;
trafo.coeff[1][1] = t_y3 - t_y1 + trafo.coeff[2][1] * t_y3;
trafo.coeff[1][2] = t_y1;
det1 = dx3 * dy2 - dy3 * dx2;
det2 = dx1 * dy2 - dy1 * dx2;
......@@ -278,8 +269,16 @@ gimp_transform_matrix_perspective (GimpMatrix3 *matrix,
trafo.coeff[2][1] = (det2 == 0.0) ? 1.0 : det1 / det2;
trafo.coeff[2][2] = 1.0;
trafo.coeff[0][0] = t_x2 - t_x1 + trafo.coeff[2][0] * t_x2;
trafo.coeff[0][1] = t_x3 - t_x1 + trafo.coeff[2][1] * t_x3;
trafo.coeff[0][2] = t_x1;
trafo.coeff[1][0] = t_y2 - t_y1 + trafo.coeff[2][0] * t_y2;
trafo.coeff[1][1] = t_y3 - t_y1 + trafo.coeff[2][1] * t_y3;
trafo.coeff[1][2] = t_y1;
}
trafo.coeff[2][2] = 1.0;
}
gimp_matrix3_mult (&trafo, matrix);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment