summaryrefslogtreecommitdiff
path: root/src/cairo-pdf-surface.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2011-09-18 13:19:57 +0930
committerAdrian Johnson <ajohnson@redneon.com>2011-09-18 13:32:32 +0930
commita01cc10fe16caf4fbadf9540c745dd58a75df38d (patch)
tree0ec8a15eff4d888f224866e3f2ba3165388f21f6 /src/cairo-pdf-surface.c
parentfc011bfcb98cfcc86b8ab81a247608e13ed70cdc (diff)
pdf: ensure ink extents is not larger than bounded extents
fixes mask test pdf output
Diffstat (limited to 'src/cairo-pdf-surface.c')
-rw-r--r--src/cairo-pdf-surface.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 16e45766..8da4f7ba 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -6145,13 +6145,15 @@ _cairo_pdf_surface_mask (void *abstract_surface,
if (unlikely (status))
goto cleanup;
+ if (! _cairo_rectangle_intersect (&extents.bounded, &extents.source))
+ goto cleanup;
+
status = _cairo_pattern_get_ink_extents (mask, &extents.mask);
if (unlikely (status))
goto cleanup;
- extents.bounded = extents.source;
if (! _cairo_rectangle_intersect (&extents.bounded, &extents.mask))
- return CAIRO_STATUS_SUCCESS;
+ goto cleanup;
status = _cairo_pdf_surface_set_clip (surface, &extents);
if (unlikely (status))