diff options
-rw-r--r-- | src/gd.c | 24 |
1 files changed, 9 insertions, 15 deletions
@@ -1991,21 +1991,15 @@ BGD_DECLARE(void) gdImageFill(gdImagePtr im, int x, int y, int nc) if (im->sx < 4) { int ix = x, iy = y, c; do { - c = gdImageGetPixel(im, ix, iy); - if (c != oc) { - goto done; - } - gdImageSetPixel(im, ix, iy, nc); - } while(ix++ < (im->sx -1)); - ix = x; - iy = y + 1; - do { - c = gdImageGetPixel(im, ix, iy); - if (c != oc) { - goto done; - } - gdImageSetPixel(im, ix, iy, nc); - } while(ix++ < (im->sx -1)); + do { + c = gdImageGetPixel(im, ix, iy); + if (c != oc) { + goto done; + } + gdImageSetPixel(im, ix, iy, nc); + } while(ix++ < (im->sx -1)); + ix = x; + } while(iy++ < (im->sy -1)); goto done; } |