diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-06-02 16:49:38 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-06-03 13:48:27 +0100 |
commit | 9c03e52fcbe65f27955dd3e021b2469f1a15f58c (patch) | |
tree | 0a60d53b060a6e44450f966f28e154d1b794e32a /pdf | |
parent | b5c628101d6d06ef5ff64ed7e776510a17ed60cf (diff) | |
download | mupdf-9c03e52fcbe65f27955dd3e021b2469f1a15f58c.tar.xz |
Improve rendering of fts_15_1506.pdf
Negative xstep or ysteps cause problems.
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/pdf_interpret.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c index 13d6751e..44a12ce8 100644 --- a/pdf/pdf_interpret.c +++ b/pdf/pdf_interpret.c @@ -1410,6 +1410,14 @@ pdf_show_pattern(pdf_csi *csi, pdf_pattern *pat, pdf_gstate *pat_gstate, const f fy0 = (local_area.y0 - pat->bbox.y0) / pat->ystep; fx1 = (local_area.x1 - pat->bbox.x0) / pat->xstep; fy1 = (local_area.y1 - pat->bbox.y0) / pat->ystep; + if (fx0 > fx1) + { + float t = fx0; fx0 = fx1; fx1 = t; + } + if (fy0 > fy1) + { + float t = fy0; fy0 = fy1; fy1 = t; + } oldtop = csi->gtop; |