summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2018-11-12 17:08:57 +0000
committerRobin Watts <robin.watts@artifex.com>2018-11-12 19:19:33 +0000
commit900869349fdb281ae7b75b39771f224e0e472d23 (patch)
treee579507ede7f04cb0db5928fb5f90d23b9610fe5 /source
parent24092ea1f4ac9cc128c73f1c4c6b947686bf8e8c (diff)
downloadmupdf-900869349fdb281ae7b75b39771f224e0e472d23.tar.xz
Bug 700154: Don't pass blends into groups within softmasks.
When generating a softmask, which is to be rendered with a blend, don't pass that blend down into the rendering of the softmask. Otherwise the blend gets used twice. In the example given this is causing the content to disappear.
Diffstat (limited to 'source')
-rw-r--r--source/pdf/pdf-op-run.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c
index 7d676214..28ecd2e3 100644
--- a/source/pdf/pdf-op-run.c
+++ b/source/pdf/pdf-op-run.c
@@ -106,6 +106,7 @@ begin_softmask(fz_context *ctx, pdf_run_processor *pr, softmask_save *save)
fz_matrix tos_save[2], save_ctm;
fz_matrix mask_matrix;
fz_colorspace *mask_colorspace;
+ int saved_blendmode;
save->softmask = softmask;
if (softmask == NULL)
@@ -135,13 +136,19 @@ begin_softmask(fz_context *ctx, pdf_run_processor *pr, softmask_save *save)
if (gstate->luminosity && !mask_colorspace)
mask_colorspace = fz_keep_colorspace(ctx, fz_device_gray(ctx));
+ saved_blendmode = gstate->blendmode;
+
fz_try(ctx)
{
fz_begin_mask(ctx, pr->dev, mask_bbox, gstate->luminosity, mask_colorspace, gstate->softmask_bc, &gstate->fill.color_params);
+ gstate->blendmode = 0;
pdf_run_xobject(ctx, pr, softmask, save->page_resources, fz_identity, 1);
}
fz_always(ctx)
+ {
fz_drop_colorspace(ctx, mask_colorspace);
+ gstate->blendmode = saved_blendmode;
+ }
fz_catch(ctx)
{
fz_rethrow_if(ctx, FZ_ERROR_TRYLATER);