summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-12-04 17:16:26 +0000
committerTor Andersson <tor@ghostscript.com>2010-12-04 17:16:26 +0000
commit5e363d8e1a2925290cc626c4d4ab43346294c056 (patch)
tree287d4f3adf031e02aca000808673dbb4096275a8
parent2b98171d913139f2371914340f598ae701f27b64 (diff)
downloadmupdf-5e363d8e1a2925290cc626c4d4ab43346294c056.tar.xz
Use correct bbox when drawing soft masks.
-rw-r--r--mupdf/pdf_build.c6
-rw-r--r--mupdf/pdf_interpret.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/mupdf/pdf_build.c b/mupdf/pdf_build.c
index 7cb5fe78..8be76e6c 100644
--- a/mupdf/pdf_build.c
+++ b/mupdf/pdf_build.c
@@ -238,7 +238,7 @@ pdf_begingroup(pdf_csi *csi, fz_rect bbox)
if (gstate->softmask)
{
pdf_xobject *softmask = gstate->softmask;
- bbox = fz_transformrect(gstate->ctm, bbox);
+ fz_rect bbox = fz_transformrect(gstate->ctm, softmask->bbox);
gstate->softmask = nil;
@@ -252,7 +252,7 @@ pdf_begingroup(pdf_csi *csi, fz_rect bbox)
gstate->softmask = softmask;
}
- if (gstate->blendmode != FZ_BNORMAL || gstate->softmask)
+ if (gstate->blendmode != FZ_BNORMAL)
csi->dev->begingroup(csi->dev->user, bbox, 0, 0, gstate->blendmode, 1);
}
@@ -261,7 +261,7 @@ pdf_endgroup(pdf_csi *csi)
{
pdf_gstate *gstate = csi->gstate + csi->gtop;
- if (gstate->blendmode != FZ_BNORMAL || gstate->softmask)
+ if (gstate->blendmode != FZ_BNORMAL)
csi->dev->endgroup(csi->dev->user);
if (gstate->softmask)
diff --git a/mupdf/pdf_interpret.c b/mupdf/pdf_interpret.c
index f4d28f9f..425b009f 100644
--- a/mupdf/pdf_interpret.c
+++ b/mupdf/pdf_interpret.c
@@ -163,7 +163,7 @@ pdf_runxobject(pdf_csi *csi, fz_obj *resources, pdf_xobject *xobj)
if (gstate->softmask)
{
pdf_xobject *softmask = gstate->softmask;
- fz_rect bbox = fz_transformrect(gstate->ctm, xobj->bbox);
+ fz_rect bbox = fz_transformrect(gstate->ctm, softmask->bbox);
gstate->softmask = nil;
popmask = 1;