[gimp] app: fix off-by-0.5 in boundary drawing
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix off-by-0.5 in boundary drawing
- Date: Sun, 26 Sep 2010 21:01:05 +0000 (UTC)
commit 7ed79e9fe18248ecf3994d13df1eb0afe24b93e6
Author: Michael Natterer <mitch gimp org>
Date: Sun Sep 26 23:00:23 2010 +0200
app: fix off-by-0.5 in boundary drawing
which doesn't seem to have any visual effect...
app/display/gimpdisplayshell-style.c | 1 +
app/widgets/gimpcairo.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-style.c b/app/display/gimpdisplayshell-style.c
index a78633a..d3ee22b 100644
--- a/app/display/gimpdisplayshell-style.c
+++ b/app/display/gimpdisplayshell-style.c
@@ -280,6 +280,7 @@ gimp_display_shell_set_selection_in_style (GimpDisplayShell *shell,
g_return_if_fail (cr != NULL);
cairo_set_line_width (cr, 1.0);
+ cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
pattern = gimp_cairo_stipple_pattern_create (&selection_in_fg,
&selection_in_bg,
diff --git a/app/widgets/gimpcairo.c b/app/widgets/gimpcairo.c
index e8276e7..c19e57b 100644
--- a/app/widgets/gimpcairo.c
+++ b/app/widgets/gimpcairo.c
@@ -126,12 +126,12 @@ gimp_cairo_add_segments (cairo_t *cr,
if (segs[i].x1 == segs[i].x2)
{
cairo_move_to (cr, segs[i].x1 + 0.5, segs[i].y1 + 0.5);
- cairo_line_to (cr, segs[i].x2 + 0.5, segs[i].y2 - 1.0);
+ cairo_line_to (cr, segs[i].x2 + 0.5, segs[i].y2 - 0.5);
}
else
{
cairo_move_to (cr, segs[i].x1 + 0.5, segs[i].y1 + 0.5);
- cairo_line_to (cr, segs[i].x2 - 1.0, segs[i].y2 + 0.5);
+ cairo_line_to (cr, segs[i].x2 - 0.5, segs[i].y2 + 0.5);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]