From 5f6c8d94faecc0bd87113a138befe554ab2172b2 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 15 Nov 2011 15:23:25 +0000 Subject: Fix clipping error. When reverting the clip path handling, I made a mistake. We need to set up the clip before starting any local group to ensure correct nesting. --- pdf/pdf_interpret.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c index 21039f8c..85901539 100644 --- a/pdf/pdf_interpret.c +++ b/pdf/pdf_interpret.c @@ -262,15 +262,15 @@ pdf_show_path(pdf_csi *csi, int doclose, int dofill, int dostroke, int even_odd) else bbox = fz_bound_path(path, NULL, gstate->ctm); - if (dofill || dostroke) - pdf_begin_group(csi, bbox); - if (csi->clip) { gstate->clip_depth++; fz_clip_path(csi->dev, path, NULL, csi->clip_even_odd, gstate->ctm); } + if (dofill || dostroke) + pdf_begin_group(csi, bbox); + if (dofill) { switch (gstate->fill.kind) -- cgit v1.2.3