[gimp] app: move the calls to cairo_translate() out of gimpdisplayshell-style.c
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: move the calls to cairo_translate() out of gimpdisplayshell-style.c
- Date: Wed, 25 Aug 2010 11:02:44 +0000 (UTC)
commit d73f08840896fc299614004b721b6252b85a3e46
Author: Michael Natterer <mitch gimp org>
Date: Wed Aug 25 13:01:12 2010 +0200
app: move the calls to cairo_translate() out of gimpdisplayshell-style.c
and keep them next to the drawing code so it becomes clear why we use
pixel centers in these cases.
app/display/gimpdisplayshell-draw.c | 2 ++
app/display/gimpdisplayshell-style.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c
index a37074e..5d4a516 100644
--- a/app/display/gimpdisplayshell-draw.c
+++ b/app/display/gimpdisplayshell-draw.c
@@ -408,6 +408,7 @@ gimp_display_shell_draw_pen (GimpDisplayShell *shell,
return;
gimp_display_shell_set_pen_style (shell, cr, context, color, width);
+ cairo_translate (cr, 0.5, 0.5);
gimp_display_shell_transform_xy (shell,
points[0].x, points[0].y,
@@ -641,6 +642,7 @@ gimp_display_shell_draw_cursor (GimpDisplayShell *shell,
if (shell->have_cursor)
{
gimp_display_shell_set_cursor_style (shell, cr);
+ cairo_translate (cr, 0.5, 0.5);
#define CURSOR_SIZE 14
diff --git a/app/display/gimpdisplayshell-style.c b/app/display/gimpdisplayshell-style.c
index adb1603..777f9b1 100644
--- a/app/display/gimpdisplayshell-style.c
+++ b/app/display/gimpdisplayshell-style.c
@@ -156,7 +156,6 @@ gimp_display_shell_set_cursor_style (GimpDisplayShell *shell,
cairo_set_line_width (cr, 1.0);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
- cairo_translate (cr, 0.5, 0.5);
}
void
@@ -176,7 +175,6 @@ gimp_display_shell_set_pen_style (GimpDisplayShell *shell,
cairo_set_line_width (cr, width);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
- cairo_translate (cr, 0.5, 0.5);
switch (active)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]