mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
3f6bb75129
commit
d73f088408
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue