summaryrefslogtreecommitdiff
path: root/src/cairo-gstate.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-05-31 16:44:29 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-05 16:08:19 +0100
commitf0e2cd4494b1ac9a351d095fbeb53d702342d35c (patch)
treeec2f33d8745e42f1fce0e51e065bacc91edcd4cf /src/cairo-gstate.c
parent900fc4a890026e46a3b0a00967632f57074b8b93 (diff)
downloadcairo-f0e2cd4494b1ac9a351d095fbeb53d702342d35c.tar.gz
gstate: Handle device scale on surface as source
When creating a transformed pattern we must apply the device transform *before* the transform set on the pattern itself, otherwise e.g. its translation will not be affected by the device scale. We also fix up the device_transform related handling in _cairo_default_context_pop_group(). With a device scale we can no longer just use the device_transform_inverse to unset the device offset for the extents, so we make that a simple translate instead. We also remove some weird code that tries to handle the device transform but seems unnecessary (maybe a workaround for applying the device transform in the wrong order?). With that code removed things work fine, but with it things get translated wrongly when there is a scale.
Diffstat (limited to 'src/cairo-gstate.c')
-rw-r--r--src/cairo-gstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 8ddb3affd..b4e988e96 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -954,7 +954,7 @@ _cairo_gstate_copy_transformed_pattern (cairo_gstate_t *gstate,
surface = surface_pattern->surface;
if (_cairo_surface_has_device_transform (surface))
- _cairo_pattern_transform (pattern, &surface->device_transform);
+ _cairo_pattern_pretransform (pattern, &surface->device_transform);
}
if (! _cairo_matrix_is_identity (ctm_inverse))