[gimp/soc-2010-cage-2] app: fix handle hovering detection, it was using the wrong radius



commit 2f3ab55a02777134f33646bc866cdb3e36c33f1b
Author: Michael Natterer <mitch gimp org>
Date:   Sat Nov 6 00:05:35 2010 +0100

    app: fix handle hovering detection, it was using the wrong radius

 app/tools/gimpcagetool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimpcagetool.c b/app/tools/gimpcagetool.c
index d831afb..fd97acb 100644
--- a/app/tools/gimpcagetool.c
+++ b/app/tools/gimpcagetool.c
@@ -614,7 +614,7 @@ gimp_cage_tool_is_on_handle (GimpCageConfig *gcc,
                                                   x, y,
                                                   vert_x, vert_y);
 
-      if (dist <= (handle_size * handle_size))
+      if (dist <= SQR (handle_size / 2))
         return i;
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]