@@ -439,9 +439,7 @@ draw_horizontal_lines(
439439 * Filled polygon draw function using scan line algorithm.
440440 */
441441static 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
593592static inline int
594593polygon8 (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
598597static inline int
599598polygon32 (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
603602static inline int
604603polygon32rgba (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
608607static inline void
0 commit comments