diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-07-30 13:38:28 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-07-30 13:38:28 +0000 |
commit | 0b954421d7908c8b835d96b4a945418c2ae08de7 (patch) | |
tree | c2e111e9488b6396963f97620ddecf8ed091e6a1 | |
parent | 090b271af70de1538e1672bc423c661399a16e11 (diff) | |
download | mupdf-0b954421d7908c8b835d96b4a945418c2ae08de7.tar.xz |
Pass the page resources to softmask xobjects.
-rw-r--r-- | mupdf/pdf_build.c | 8 | ||||
-rw-r--r-- | mupdf/pdf_interpret.c | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/mupdf/pdf_build.c b/mupdf/pdf_build.c index b34e1548..9c2bd2c7 100644 --- a/mupdf/pdf_build.c +++ b/mupdf/pdf_build.c @@ -206,13 +206,17 @@ pdf_showpattern(pdf_csi *csi, pdf_pattern *pat, fz_rect bbox, int what) gstate->ctm = fz_concat(fz_translate(x * pat->xstep, y * pat->ystep), ptm); csi->topctm = gstate->ctm; error = pdf_runcsibuffer(csi, pat->resources, pat->contents); - if (error) - fz_catch(error, "cannot render pattern tile"); while (oldtop < csi->gtop) pdf_grestore(csi); + if (error) + { + fz_catch(error, "cannot render pattern tile"); + goto cleanup; + } } } +cleanup: csi->topctm = oldtopctm; pdf_grestore(csi); diff --git a/mupdf/pdf_interpret.c b/mupdf/pdf_interpret.c index 62b286a0..95f2ed42 100644 --- a/mupdf/pdf_interpret.c +++ b/mupdf/pdf_interpret.c @@ -169,7 +169,7 @@ pdf_runxobject(pdf_csi *csi, fz_obj *resources, pdf_xobject *xobj) popmask = 1; csi->dev->beginmask(csi->dev->user, bbox, gstate->luminosity, nil, nil); - error = pdf_runxobject(csi, nil, softmask); + error = pdf_runxobject(csi, resources, softmask); if (error) return fz_rethrow(error, "cannot run softmask"); csi->dev->endmask(csi->dev->user); |