summaryrefslogtreecommitdiff
path: root/src/cairo-pattern-private.h
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-pattern-private.h
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-pattern-private.h')
-rw-r--r--src/cairo-pattern-private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-pattern-private.h b/src/cairo-pattern-private.h
index dfd843fc1..bbcfadd85 100644
--- a/src/cairo-pattern-private.h
+++ b/src/cairo-pattern-private.h
@@ -237,6 +237,10 @@ cairo_private void
_cairo_pattern_transform (cairo_pattern_t *pattern,
const cairo_matrix_t *ctm_inverse);
+cairo_private void
+_cairo_pattern_pretransform (cairo_pattern_t *pattern,
+ const cairo_matrix_t *ctm);
+
cairo_private cairo_bool_t
_cairo_pattern_is_opaque_solid (const cairo_pattern_t *pattern);