summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-11-15 15:23:25 +0000
committerRobin Watts <robin.watts@artifex.com>2011-11-15 15:23:25 +0000
commit5f6c8d94faecc0bd87113a138befe554ab2172b2 (patch)
tree6af0888191ce7a02e33d7f4de99e66430b044276
parent6610ebcb477e204605a1a3dd95e89b03382ee760 (diff)
downloadmupdf-5f6c8d94faecc0bd87113a138befe554ab2172b2.tar.xz
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.
-rw-r--r--pdf/pdf_interpret.c6
1 files 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)