From 3af5cbf40d7fd8eaca5ed415e715d36950ccfa71 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Fri, 14 Jul 2017 09:12:25 -0700 Subject: 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. --- source/pdf/pdf-op-run.c | 6 ++++-- 1 file 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); -- cgit v1.2.3