gimp r26066 - in trunk: . app/tools



Author: martinn
Date: Sat Jul  5 11:01:20 2008
New Revision: 26066
URL: http://svn.gnome.org/viewvc/gimp?rev=26066&view=rev

Log:
2008-07-05  Martin Nordholts  <martinn svn gnome org>

	* app/tools/gimprectangletool.c: 
	* app/tools/gimpeditselectiontool.c: Simplify math.


Modified:
   trunk/ChangeLog
   trunk/app/tools/gimpeditselectiontool.c
   trunk/app/tools/gimprectangletool.c

Modified: trunk/app/tools/gimpeditselectiontool.c
==============================================================================
--- trunk/app/tools/gimpeditselectiontool.c	(original)
+++ trunk/app/tools/gimpeditselectiontool.c	Sat Jul  5 11:01:20 2008
@@ -436,8 +436,8 @@
                                         y2 - y1);
 
     /* Save where to draw the mark of the center */
-    edit_select->center_x = x1 + (x2 - x1) / 2.0;
-    edit_select->center_y = y1 + (y2 - y1) / 2.0;
+    edit_select->center_x = (x1 + x2) / 2.0;
+    edit_select->center_y = (y1 + y2) / 2.0;
   }
 
   gimp_tool_control_activate (GIMP_TOOL (edit_select)->control);

Modified: trunk/app/tools/gimprectangletool.c
==============================================================================
--- trunk/app/tools/gimprectangletool.c	(original)
+++ trunk/app/tools/gimprectangletool.c	Sat Jul  5 11:01:20 2008
@@ -1672,8 +1672,8 @@
         {
           /* Mark the center because we snap to it */
           gimp_draw_tool_draw_cross_by_anchor (draw_tool,
-                                               pub_x1 + (pub_x2 - pub_x1) / 2.0,
-                                               pub_y1 + (pub_y2 - pub_y1) / 2.0,
+                                               (pub_x1 + pub_x2) / 2.0,
+                                               (pub_y1 + pub_y2) / 2.0,
                                                CENTER_CROSS_SIZE,
                                                CENTER_CROSS_SIZE,
                                                GTK_ANCHOR_CENTER,



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