Skip to content

Commit fcac6e7

Browse files
committed
Removed hasAlpha argument
1 parent 2ee2a14 commit fcac6e7

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/libImaging/Draw.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,7 @@ draw_horizontal_lines(
439439
* Filled polygon draw function using scan line algorithm.
440440
*/
441441
static inline int
442-
polygon_generic(
443-
Imaging im, int n, Edge *e, int ink, int eofill, hline_handler hline, int hasAlpha
444-
) {
442+
polygon_generic(Imaging im, int n, Edge *e, int ink, int eofill, hline_handler hline) {
445443
Edge **edge_table;
446444
float *xx;
447445
int edge_count = 0;
@@ -461,6 +459,7 @@ polygon_generic(
461459
return -1;
462460
}
463461

462+
int hasAlpha = hline == hline32rgba;
464463
for (i = 0; i < n; i++) {
465464
if (ymin > e[i].ymin) {
466465
ymin = e[i].ymin;
@@ -592,17 +591,17 @@ polygon_generic(
592591

593592
static inline int
594593
polygon8(Imaging im, int n, Edge *e, int ink, int eofill) {
595-
return polygon_generic(im, n, e, ink, eofill, hline8, 0);
594+
return polygon_generic(im, n, e, ink, eofill, hline8);
596595
}
597596

598597
static inline int
599598
polygon32(Imaging im, int n, Edge *e, int ink, int eofill) {
600-
return polygon_generic(im, n, e, ink, eofill, hline32, 0);
599+
return polygon_generic(im, n, e, ink, eofill, hline32);
601600
}
602601

603602
static inline int
604603
polygon32rgba(Imaging im, int n, Edge *e, int ink, int eofill) {
605-
return polygon_generic(im, n, e, ink, eofill, hline32rgba, 1);
604+
return polygon_generic(im, n, e, ink, eofill, hline32rgba);
606605
}
607606

608607
static inline void

0 commit comments

Comments
 (0)