From 9c03e52fcbe65f27955dd3e021b2469f1a15f58c Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Sun, 2 Jun 2013 16:49:38 +0100 Subject: Improve rendering of fts_15_1506.pdf Negative xstep or ysteps cause problems. --- pdf/pdf_interpret.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pdf') 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; -- cgit v1.2.3