fixed my fix for bug # 68106, which worked incorrectly for two of the

2004-06-19 Bill Skaggs  <weskaggs@primate.ucdavis.edu>

	* app/tools/gimpscaletool.c: fixed my fix for bug # 68106, which
	worked incorrectly for two of the control points.
This commit is contained in:
Bill Skaggs 2004-06-19 18:40:51 +00:00 committed by William Skaggs
parent c4558d8e1c
commit 8ec615926e
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-06-19 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpscaletool.c: fixed my fix for bug # 68106, which
worked incorrectly for two of the control points.
2004-06-19 Michael Natterer <mitch@gimp.org> 2004-06-19 Michael Natterer <mitch@gimp.org>
* modules/controller_midi.c (midi_read_event): simplified * modules/controller_midi.c (midi_read_event): simplified

View File

@ -343,12 +343,13 @@ gimp_scale_tool_motion (GimpTransformTool *tr_tool,
mag = hypot ((gdouble)(tr_tool->x2 - tr_tool->x1), mag = hypot ((gdouble)(tr_tool->x2 - tr_tool->x1),
(gdouble)(tr_tool->y2 - tr_tool->y1)); (gdouble)(tr_tool->y2 - tr_tool->y1));
dot = diff_x * (tr_tool->x2 - tr_tool->x1) + diff_y * (tr_tool->y2 - tr_tool->y1); dot = dir_x * diff_x * (tr_tool->x2 - tr_tool->x1)
+ dir_y * diff_y * (tr_tool->y2 - tr_tool->y1);
if (mag > 0.) if (mag > 0.)
{ {
diff_x = (tr_tool->x2 - tr_tool->x1) * dot / (mag*mag); diff_x = dir_x * (tr_tool->x2 - tr_tool->x1) * dot / (mag*mag);
diff_y = (tr_tool->y2 - tr_tool->y1) * dot / (mag*mag); diff_y = dir_y * (tr_tool->y2 - tr_tool->y1) * dot / (mag*mag);
} }
else else
diff_x = diff_y = 0; diff_x = diff_y = 0;