diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2017-07-14 09:12:25 -0700 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-07-17 19:32:06 +0100 |
commit | 3af5cbf40d7fd8eaca5ed415e715d36950ccfa71 (patch) | |
tree | 223e6d70632e4c048936d0bf5dc2b819e246d731 | |
parent | 9b714248bc871502d9e80dfcd72404e69fcc234c (diff) | |
download | mupdf-3af5cbf40d7fd8eaca5ed415e715d36950ccfa71.tar.xz |
Non-isolated groups should use parent color space
Even if the group defines a color space, it should be
ignored if the group is not isolated. Fixes issue
in page 7 of Altona test.
-rw-r--r-- | source/pdf/pdf-op-run.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index 56c84cd9..12797b8e 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -1250,6 +1250,8 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf if (transparency) { fz_rect bbox; + int isolated = pdf_xobject_isolated(ctx, xobj); + bbox = xobj_bbox; fz_transform_rect(&bbox, &gstate->ctm); @@ -1262,8 +1264,8 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf * if it throws an error, we must call fz_end_group. */ cleanup_state = 2; fz_begin_group(ctx, pr->dev, &bbox, - pdf_xobject_colorspace(ctx, xobj), - (is_smask ? 1 : pdf_xobject_isolated(ctx, xobj)), + (isolated ? pdf_xobject_colorspace(ctx, xobj) : NULL), + (is_smask ? 1 : isolated), pdf_xobject_knockout(ctx, xobj), gstate->blendmode, gstate->fill.alpha); |