[gimp] app: fix off-by-one in rectangle tool guides
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix off-by-one in rectangle tool guides
- Date: Fri, 24 Sep 2010 09:23:30 +0000 (UTC)
commit 75c11e259d1c8df186bac75f0a226ac920fa3124
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 24 11:21:07 2010 +0200
app: fix off-by-one in rectangle tool guides
and draw the guides below the rectangle.
app/tools/gimprectangletool.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c
index 370af8c..eaac8a8 100644
--- a/app/tools/gimprectangletool.c
+++ b/app/tools/gimprectangletool.c
@@ -1734,6 +1734,8 @@ gimp_rectangle_tool_draw (GimpDrawTool *draw_tool)
if (private->function == GIMP_RECTANGLE_TOOL_INACTIVE)
return;
+ gimp_rectangle_tool_draw_guides (draw_tool);
+
gimp_draw_tool_draw_rectangle (draw_tool, FALSE,
pub_x1,
pub_y1,
@@ -1824,8 +1826,6 @@ gimp_rectangle_tool_draw (GimpDrawTool *draw_tool)
gimp_rectangle_tool_get_anchor (private));
break;
}
-
- gimp_rectangle_tool_draw_guides (draw_tool);
}
static void
@@ -1837,6 +1837,8 @@ gimp_rectangle_tool_draw_guides (GimpDrawTool *draw_tool)
gimp_rectangle_tool_get_public_rect (GIMP_RECTANGLE_TOOL (draw_tool),
&x1, &y1, &x2, &y2);
+ x2 -= 1.0;
+ y2 -= 1.0;
switch (GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool)->guide)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]