mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-05 14:58:17 +02:00
push-group: Fix path translation when pushing a group with device offsets
With the previous code, the parent's device offset wasn't undone before applying the new device offset. Tested by push-group-path-offset test.
This commit is contained in:
parent
a9b8d1a94e
commit
2e8571d95c
1 changed files with 3 additions and 2 deletions
|
|
@ -615,6 +615,7 @@ cairo_push_group_with_content (cairo_t *cr, cairo_content_t content)
|
|||
cairo_surface_t *parent_surface;
|
||||
const cairo_rectangle_int_t *clip_extents;
|
||||
cairo_rectangle_int_t extents;
|
||||
cairo_matrix_t matrix;
|
||||
cairo_bool_t is_empty;
|
||||
|
||||
parent_surface = _cairo_gstate_get_target (cr->gstate);
|
||||
|
|
@ -646,8 +647,8 @@ cairo_push_group_with_content (cairo_t *cr, cairo_content_t content)
|
|||
|
||||
/* If we have a current path, we need to adjust it to compensate for
|
||||
* the device offset just applied. */
|
||||
_cairo_path_fixed_transform (cr->path,
|
||||
&group_surface->device_transform);
|
||||
cairo_matrix_init_translate (&matrix, -extents.x, -extents.y);
|
||||
_cairo_path_fixed_transform (cr->path, &matrix);
|
||||
}
|
||||
|
||||
/* create a new gstate for the redirect */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue