in class/System.Windows/System.Windows/:
[moon.git] / cairo-patches / 02-clip-group
bloba7cee5361ae4f4297515f8db732e71fe58461a48
1 diff --git a/src/cairo.c b/src/cairo.c
2 index 5f26d6f..c462e42 100644
3 --- a/src/cairo.c
4 +++ b/src/cairo.c
5 @@ -530,6 +530,11 @@ cairo_push_group_with_content (cairo_t *cr, cairo_content_t content)
6                                       parent_surface->device_transform.x0 - extents.x,
7                                       parent_surface->device_transform.y0 - extents.y);
8  
9 +    /* If we have a current path, we need to adjust it to compensate for
10 +     * the device offset just applied. */
11 +    _cairo_path_fixed_transform (cr->path,
12 +                                &group_surface->device_transform);
14      /* create a new gstate for the redirect */
15      cairo_save (cr);
16      if (cr->status)
17 @@ -613,6 +618,11 @@ cairo_pop_group (cairo_t *cr)
18         cairo_pattern_set_matrix (group_pattern, &group_matrix);
19      }
21 +    /* If we have a current path, we need to adjust it to compensate for
22 +     * the device offset just removed. */
23 +    _cairo_path_fixed_transform (cr->path,
24 +                                &group_surface->device_transform_inverse);
26  done:
27      cairo_surface_destroy (group_surface);