]> granicus.if.org Git - php/commitdiff
- Really fix imagefill, part of my previous (old) fix was not applied
authorPierre Joye <pajoye@php.net>
Wed, 17 Nov 2004 20:19:35 +0000 (20:19 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 17 Nov 2004 20:19:35 +0000 (20:19 +0000)
  (blame me), bak the alphablending and restore it on exit

ext/gd/libgd/gd.c

index 527e93c36f389f5ba91a9ab4a9f926b44e889bda..82ba0b51b628448be439e3cd030deee7f6cba5f4 100644 (file)
@@ -1877,11 +1877,17 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc)
        int l, x1, x2, dy;
        int oc;   /* old pixel value */
        int wx2,wy2;
+
+       int alphablending_bak;
+
        /* stack of filled segments */
        /* struct seg stack[FILL_MAX],*sp = stack;; */
        struct seg *stack;
        struct seg *sp;
 
+       alphablending_bak = im->alphaBlendingFlag;      
+       im->alphaBlendingFlag = 0;
+
        if (nc==gdTiled){
                _gdImageFillTiled(im,x,y,nc);
                return;
@@ -1932,6 +1938,7 @@ skip:                     for (x++; x<=x2 && (gdImageGetPixel(im, x, y)!=oc); x++);
                } while (x<=x2);
        }
        efree(stack);
+       im->alphaBlendingFlag = alphablending_bak;      
 }
 
 void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc)