Commit 10eee1e7 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

don't draw the grid when the bounding box becomes concave.

2003-07-16  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptransformtool.c (gimp_transform_tool_draw): don't
	draw the grid when the bounding box becomes concave.
parent b61a70c5
2003-07-16 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformtool.c (gimp_transform_tool_draw): don't
draw the grid when the bounding box becomes concave.
2003-07-15 Jakub Steiner <jimmac@ximian.com>
 
* etc/templaterc: add PAL and NTSC templates
......@@ -644,7 +644,6 @@ gimp_transform_tool_draw (GimpDrawTool *draw_tool)
GimpTool *tool;
GimpTransformTool *tr_tool;
GimpTransformOptions *options;
gint i, k, gci;
tr_tool = GIMP_TRANSFORM_TOOL (draw_tool);
......@@ -674,12 +673,18 @@ gimp_transform_tool_draw (GimpDrawTool *draw_tool)
/* Draw the grid */
if ((tr_tool->grid_coords != NULL) && (tr_tool->tgrid_coords != NULL))
if (tr_tool->grid_coords &&
tr_tool->tgrid_coords &&
tr_tool->transform.coeff[0][0] >= 0.0 &&
tr_tool->transform.coeff[1][1] >= 0.0 &&
tr_tool->transform.coeff[1][0] >= -1.0 &&
tr_tool->transform.coeff[0][1] >= -1.0)
{
gci = 0;
gint gci, i, k;
k = tr_tool->ngx + tr_tool->ngy;
for (i = 0; i < k; i++)
for (i = 0, gci = 0; i < k; i++, gci += 4)
{
gimp_draw_tool_draw_line (draw_tool,
tr_tool->tgrid_coords[gci],
......@@ -687,7 +692,6 @@ gimp_transform_tool_draw (GimpDrawTool *draw_tool)
tr_tool->tgrid_coords[gci + 2],
tr_tool->tgrid_coords[gci + 3],
FALSE);
gci += 4;
}
}
......@@ -734,7 +738,7 @@ gimp_transform_tool_draw (GimpDrawTool *draw_tool)
if (options->direction == GIMP_TRANSFORM_BACKWARD)
{
GimpMatrix3 inv_matrix = tr_tool->transform;
gimp_matrix3_invert (&inv_matrix);
path_transform_draw_current (tool->gdisp,
draw_tool, inv_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