Commit dbce9d49 authored by Michael Natterer's avatar Michael Natterer 😴

app: fix scrolling in of dashed lines

Before, the pattern offset was always relative to the widget, which
completely destroyed the stipples when the got scrolled in. Now we
simply set the shell's scroll offsets as cairo translation and
everything looks perfect.
parent 3e69ae00
......@@ -376,6 +376,7 @@ gimp_canvas_grid_stroke (GimpCanvasItem *item,
if (private->grid_style)
{
cairo_translate (cr, -shell->offset_x, -shell->offset_y);
gimp_display_shell_set_grid_style (shell, cr, private->grid);
cairo_stroke (cr);
}
......
......@@ -253,6 +253,7 @@ gimp_canvas_guide_stroke (GimpCanvasItem *item,
if (private->guide_style)
{
cairo_translate (cr, -shell->offset_x, -shell->offset_y);
gimp_display_shell_set_guide_style (shell, cr,
gimp_canvas_item_get_highlight (item));
cairo_stroke (cr);
......
......@@ -183,8 +183,8 @@ gimp_canvas_layer_boundary_stroke (GimpCanvasItem *item,
{
GimpCanvasLayerBoundaryPrivate *private = GET_PRIVATE (item);
cairo_translate (cr, -shell->offset_x, -shell->offset_y);
gimp_display_shell_set_layer_style (shell, cr, private->layer);
cairo_stroke (cr);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment