mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 15:10:08 +01:00
Fix scaling with a device offset
Apply the device offset transformation to the pattern before the ctm one. Fixes bug #16469.
This commit is contained in:
parent
3074ba02a1
commit
1a9809baab
1 changed files with 3 additions and 2 deletions
|
|
@ -795,8 +795,7 @@ _cairo_gstate_copy_transformed_pattern (cairo_gstate_t *gstate,
|
|||
if (status)
|
||||
return status;
|
||||
|
||||
_cairo_pattern_transform (pattern, ctm_inverse);
|
||||
|
||||
/* apply device_transform first so that it is transformed by ctm_inverse */
|
||||
if (cairo_pattern_get_type (original) == CAIRO_PATTERN_TYPE_SURFACE) {
|
||||
surface_pattern = (cairo_surface_pattern_t *) original;
|
||||
surface = surface_pattern->surface;
|
||||
|
|
@ -804,6 +803,8 @@ _cairo_gstate_copy_transformed_pattern (cairo_gstate_t *gstate,
|
|||
_cairo_pattern_transform (pattern, &surface->device_transform);
|
||||
}
|
||||
|
||||
_cairo_pattern_transform (pattern, ctm_inverse);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue