summaryrefslogtreecommitdiff
path: root/src/cairo-surface-wrapper.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-08-14 14:45:00 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-08-14 14:45:00 +0100
commit0053a44f6b9806eb61452859ba1eb2ca8c72f564 (patch)
tree9bc580816960f6a3adfe712955cae9517a0750e2 /src/cairo-surface-wrapper.c
parenteb09a686388b889f67f3a9b2c820575a1cfbc304 (diff)
downloadcairo-0053a44f6b9806eb61452859ba1eb2ca8c72f564.tar.gz
record: Offset the clip by the replay transformation as well
Fixes push-group-offset which reduces to a replay of a recording surface inside a recording surface and forgot to offset the clip imposed by the extents of the first recording surface into device space. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-surface-wrapper.c')
-rw-r--r--src/cairo-surface-wrapper.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cairo-surface-wrapper.c b/src/cairo-surface-wrapper.c
index 615deb023..5e6286906 100644
--- a/src/cairo-surface-wrapper.c
+++ b/src/cairo-surface-wrapper.c
@@ -120,12 +120,19 @@ _cairo_surface_wrapper_get_clip (cairo_surface_wrapper_t *wrapper,
cairo_clip_t *copy;
copy = _cairo_clip_copy (clip);
- if (wrapper->has_extents)
+ if (wrapper->has_extents) {
copy = _cairo_clip_intersect_rectangle (copy, &wrapper->extents);
- if (wrapper->extents.x | wrapper->extents.y)
+ if (wrapper->extents.x | wrapper->extents.y)
+ copy = _cairo_clip_translate (copy,
+ -wrapper->extents.x,
+ -wrapper->extents.y);
+ }
+ if (! _cairo_matrix_is_identity (&wrapper->transform)) {
+ /* XXX */
copy = _cairo_clip_translate (copy,
- -wrapper->extents.x,
- -wrapper->extents.y);
+ wrapper->transform.x0,
+ wrapper->transform.y0);
+ }
if (! _cairo_matrix_is_identity (&wrapper->target->device_transform)) {
/* XXX */
copy = _cairo_clip_translate (copy,