From 87e828aea737b2e18b9941d5d7888cd4c673627e Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 13 Apr 2017 09:53:51 +0100 Subject: Scan converter; simplify API. In all cases, we sort the gel before scan converting it. So just roll the sort call into the scan convert call. --- source/fitz/draw-edge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/fitz/draw-edge.c') diff --git a/source/fitz/draw-edge.c b/source/fitz/draw-edge.c index 4465d90a..43394fcb 100644 --- a/source/fitz/draw-edge.c +++ b/source/fitz/draw-edge.c @@ -587,8 +587,8 @@ cmpedge(const void *va, const void *vb) return a->y - b->y; } -void -fz_sort_gel(fz_context *ctx, fz_gel *gel) +static void +sort_gel(fz_context *ctx, fz_gel *gel) { fz_edge *a = gel->edges; int n = gel->len; @@ -1160,6 +1160,8 @@ fz_scan_convert(fz_context *ctx, fz_gel *gel, int eofill, const fz_irect *clip, if (fz_is_empty_irect(fz_intersect_irect(fz_pixmap_bbox_no_ctx(dst, &local_clip), clip))) return; + sort_gel(ctx, gel); + if (fz_aa_bits > 0) { void *fn; -- cgit v1.2.3