]> git.imager.perl.org - imager.git/commitdiff
- 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 55ff57b206d641f5ade5297336e6a0ed18706fc1..d0c1d8f461bd9469dece286324604c49bfe188f0 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 5a81de51f3158b61b81edd12a7c39b6ae4f2cb0c..257713ca54398bd339a801da942f35f528dde883 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) {