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:
Jeff Muizelaar 2008-07-21 22:24:42 -04:00
parent 3074ba02a1
commit 1a9809baab

View file

@ -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;
}