From 9914f383f7193980c8bc5b910de4e2e429283d29 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 23 Jul 2013 17:41:28 +0200 Subject: Fix MIN/MAX confusion in edge list clipping. The case with infinite scissor didn't work. --- source/fitz/draw-edge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/fitz') diff --git a/source/fitz/draw-edge.c b/source/fitz/draw-edge.c index 5f2f45d3..7809de78 100644 --- a/source/fitz/draw-edge.c +++ b/source/fitz/draw-edge.c @@ -182,8 +182,8 @@ fz_new_gel(fz_context *ctx) gel->len = 0; gel->edges = fz_malloc_array(ctx, gel->cap, sizeof(fz_edge)); - gel->clip.x0 = gel->clip.y0 = BBOX_MAX; - gel->clip.x1 = gel->clip.y1 = BBOX_MIN; + gel->clip.x0 = gel->clip.y0 = BBOX_MIN; + gel->clip.x1 = gel->clip.y1 = BBOX_MAX; gel->bbox.x0 = gel->bbox.y0 = BBOX_MAX; gel->bbox.x1 = gel->bbox.y1 = BBOX_MIN; @@ -210,8 +210,8 @@ fz_reset_gel(fz_gel *gel, const fz_irect *clip) if (fz_is_infinite_irect(clip)) { - gel->clip.x0 = gel->clip.y0 = BBOX_MAX; - gel->clip.x1 = gel->clip.y1 = BBOX_MIN; + gel->clip.x0 = gel->clip.y0 = BBOX_MIN; + gel->clip.x1 = gel->clip.y1 = BBOX_MAX; } else { gel->clip.x0 = clip->x0 * fz_aa_hscale; -- cgit v1.2.3