[pdf] Restore original surface size after emitting group mask

A trivial fix to reset the original surface size after emitting the group.
The annoying aspect is that this should have been caught by the test suite.
Alas, no. A gentle reminder that simple line coverage is insufficient. :(
This commit is contained in:
Chris Wilson 2009-06-27 16:54:37 +01:00
parent f8a2665840
commit c506ddb586

View file

@ -4694,8 +4694,10 @@ _cairo_pdf_surface_write_smask_group (cairo_pdf_surface_t *surface,
group->height);
/* _mask is a special case that requires two groups - source
* and mask as well as a smask and gstate dictionary */
if (group->operation == PDF_MASK)
return _cairo_pdf_surface_write_mask_group (surface, group);
if (group->operation == PDF_MASK) {
status = _cairo_pdf_surface_write_mask_group (surface, group);
goto RESTORE_SIZE;
}
status = _cairo_pdf_surface_open_group (surface, &group->group_res);
if (unlikely (status))
@ -4747,6 +4749,7 @@ _cairo_pdf_surface_write_smask_group (cairo_pdf_surface_t *surface,
status = _cairo_pdf_surface_close_group (surface, NULL);
RESTORE_SIZE:
_cairo_pdf_surface_set_size_internal (surface,
old_width,
old_height);