mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 20:12:30 +00:00
Simplify math.
2008-07-05 Martin Nordholts <martinn@svn.gnome.org> * app/tools/gimprectangletool.c: * app/tools/gimpeditselectiontool.c: Simplify math. svn path=/trunk/; revision=26066
This commit is contained in:
parent
995a944ca8
commit
ac19e7deb8
|
@ -1,3 +1,8 @@
|
|||
2008-07-05 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/tools/gimprectangletool.c:
|
||||
* app/tools/gimpeditselectiontool.c: Simplify math.
|
||||
|
||||
2008-07-05 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/tools/gimprectangletool.c:
|
||||
|
|
|
@ -436,8 +436,8 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
|
|||
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);
|
||||
|
|
|
@ -1672,8 +1672,8 @@ gimp_rectangle_tool_draw (GimpDrawTool *draw_tool)
|
|||
{
|
||||
/* 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,
|
||||
|
|
Loading…
Reference in a new issue