diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-10-10 10:29:47 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-10-10 11:16:59 +0100 |
commit | 4ebd4ce6b9ac1c67a366160e5a1b4fbbf102baa6 (patch) | |
tree | 70c548c3842024266fce85cd81639c3a2754479d /source/pdf | |
parent | 6bf8f97d9be871c026eccf25c71f79aaffee2a53 (diff) | |
download | mupdf-4ebd4ce6b9ac1c67a366160e5a1b4fbbf102baa6.tar.xz |
Use the 'rect' param to fz_clip_path.
fz_clip_path takes a rect parameter, but all the callers of it use
NULL. In most cases they have a perfectly reasonable value that they
could pass to hand anyway. Update the code to pass this value, which
saves the need for the scissor stack keeping code to recalculate it.
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-interpret.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c index 3790578f..d7e3a021 100644 --- a/source/pdf/pdf-interpret.c +++ b/source/pdf/pdf-interpret.c @@ -558,7 +558,7 @@ pdf_show_path(pdf_csi *csi, int doclose, int dofill, int dostroke, int even_odd) if (csi->clip) { gstate->clip_depth++; - fz_clip_path(csi->dev, path, NULL, csi->clip_even_odd, &gstate->ctm); + fz_clip_path(csi->dev, path, &bbox, csi->clip_even_odd, &gstate->ctm); csi->clip = 0; } @@ -581,7 +581,7 @@ pdf_show_path(pdf_csi *csi, int doclose, int dofill, int dostroke, int even_odd) case PDF_MAT_PATTERN: if (gstate->fill.pattern) { - fz_clip_path(csi->dev, path, NULL, even_odd, &gstate->ctm); + fz_clip_path(csi->dev, path, &bbox, even_odd, &gstate->ctm); pdf_show_pattern(csi, gstate->fill.pattern, &csi->gstate[gstate->fill.gstate_num], &bbox, PDF_FILL); fz_pop_clip(csi->dev); } @@ -589,7 +589,7 @@ pdf_show_path(pdf_csi *csi, int doclose, int dofill, int dostroke, int even_odd) case PDF_MAT_SHADE: if (gstate->fill.shade) { - fz_clip_path(csi->dev, path, NULL, even_odd, &gstate->ctm); + fz_clip_path(csi->dev, path, &bbox, even_odd, &gstate->ctm); /* The cluster and page 2 of patterns.pdf shows that fz_fill_shade should NOT be called with gstate->ctm. */ fz_fill_shade(csi->dev, gstate->fill.shade, &csi->gstate[gstate->fill.gstate_num].ctm, gstate->fill.alpha); fz_pop_clip(csi->dev); |