From fcac6e78966f7cac4813731dc2303f80f844b320 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 29 May 2025 18:27:17 +1000 Subject: [PATCH] Removed hasAlpha argument --- src/libImaging/Draw.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libImaging/Draw.c b/src/libImaging/Draw.c index d5aff8709..046293379 100644 --- a/src/libImaging/Draw.c +++ b/src/libImaging/Draw.c @@ -439,9 +439,7 @@ draw_horizontal_lines( * Filled polygon draw function using scan line algorithm. */ static inline int -polygon_generic( - Imaging im, int n, Edge *e, int ink, int eofill, hline_handler hline, int hasAlpha -) { +polygon_generic(Imaging im, int n, Edge *e, int ink, int eofill, hline_handler hline) { Edge **edge_table; float *xx; int edge_count = 0; @@ -461,6 +459,7 @@ polygon_generic( return -1; } + int hasAlpha = hline == hline32rgba; for (i = 0; i < n; i++) { if (ymin > e[i].ymin) { ymin = e[i].ymin; @@ -592,17 +591,17 @@ polygon_generic( static inline int polygon8(Imaging im, int n, Edge *e, int ink, int eofill) { - return polygon_generic(im, n, e, ink, eofill, hline8, 0); + return polygon_generic(im, n, e, ink, eofill, hline8); } static inline int polygon32(Imaging im, int n, Edge *e, int ink, int eofill) { - return polygon_generic(im, n, e, ink, eofill, hline32, 0); + return polygon_generic(im, n, e, ink, eofill, hline32); } static inline int polygon32rgba(Imaging im, int n, Edge *e, int ink, int eofill) { - return polygon_generic(im, n, e, ink, eofill, hline32rgba, 1); + return polygon_generic(im, n, e, ink, eofill, hline32rgba); } static inline void