From 8ec615926e362fd42cbcc5a31b84be8b6b9747ae Mon Sep 17 00:00:00 2001 From: Bill Skaggs Date: Sat, 19 Jun 2004 18:40:51 +0000 Subject: [PATCH] fixed my fix for bug # 68106, which worked incorrectly for two of the 2004-06-19 Bill Skaggs * app/tools/gimpscaletool.c: fixed my fix for bug # 68106, which worked incorrectly for two of the control points. --- ChangeLog | 5 +++++ app/tools/gimpscaletool.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47ba96e0e1..d515b8ec2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-19 Bill Skaggs + + * app/tools/gimpscaletool.c: fixed my fix for bug # 68106, which + worked incorrectly for two of the control points. + 2004-06-19 Michael Natterer * modules/controller_midi.c (midi_read_event): simplified diff --git a/app/tools/gimpscaletool.c b/app/tools/gimpscaletool.c index 47df05cd85..020d11370d 100644 --- a/app/tools/gimpscaletool.c +++ b/app/tools/gimpscaletool.c @@ -343,12 +343,13 @@ gimp_scale_tool_motion (GimpTransformTool *tr_tool, mag = hypot ((gdouble)(tr_tool->x2 - tr_tool->x1), (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.) { - diff_x = (tr_tool->x2 - tr_tool->x1) * dot / (mag*mag); - diff_y = (tr_tool->y2 - tr_tool->y1) * dot / (mag*mag); + diff_x = dir_x * (tr_tool->x2 - tr_tool->x1) * dot / (mag*mag); + diff_y = dir_y * (tr_tool->y2 - tr_tool->y1) * dot / (mag*mag); } else diff_x = diff_y = 0;