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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user