- filled polygons using a complex fill with combine != 0 (none) didn't
authorTony Cook <tony@develop=help.com>
Tue, 29 Nov 2005 09:20:31 +0000 (09:20 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 29 Nov 2005 09:20:31 +0000 (09:20 +0000)
  correctly handle polygons that crossed a given scanline more than once.

Changes
polygon.c

diff --git a/Changes b/Changes
index 55ff57b..d0c1d8f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1189,6 +1189,8 @@ Revision history for Perl extension Imager.
   path (Makefile.PL).  This was a later response to #16094
   Resolves: http://rt.cpan.org/NoAuth/Bug.html?16094
 - add --nolog command-line switch to Makefile.PL to disable logging
+- filled polygons using a complex fill with combine != 0 (none) didn't
+  correctly handle polygons that crossed a given scanline more than once.
 
 =================================================================
 
index 5a81de5..257713c 100644 (file)
--- a/polygon.c
+++ b/polygon.c
@@ -676,9 +676,9 @@ scanline_flush_cfill(i_img *im, ss_scanline *ss, int y, void *ctx) {
         tv = saturate(ss->line[x]);
         fillbuf[pos].channel[3] = 
           fillbuf[pos].channel[3] * tv / 255;
+       pos++;
       }
       (state->fill->combine)(line, fillbuf, im->channels, right-left);
-      pos++;
     }
     else {
       for (x = left; x < right; ++x) {
@@ -738,9 +738,9 @@ scanline_flush_cfill_f(i_img *im, ss_scanline *ss, int y, void *ctx) {
         tv = saturate(ss->line[x]);
         fillbuf[pos].channel[3] = 
           fillbuf[pos].channel[3] * tv / 255;
+       pos++;
       }
       (state->fill->combinef)(line, fillbuf, im->channels, right-left);
-      pos++;
     }
     else {
       for (x = left; x < right; ++x) {