summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/libgd/gd.c')
-rw-r--r--ext/gd/libgd/gd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 1459f4cb5f..cff22915a0 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1760,13 +1760,18 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
int lastBorder;
/* Seek left */
int leftLimit = -1, rightLimit;
- int i;
+ int i, restoreAlphaBleding=0;
if (border < 0) {
/* Refuse to fill to a non-solid border */
return;
}
+ if (im->alphaBlendingFlag) {
+ restoreAlphaBleding = 1;
+ im->alphaBlendingFlag = 0;
+ }
+
if (x >= im->sx) {
x = im->sx - 1;
}
@@ -1809,6 +1814,7 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
}
}
}
+
/* Below */
if (y < ((im->sy) - 1)) {
lastBorder = 1;
@@ -1825,8 +1831,11 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
}
}
}
-}
+ if (restoreAlphaBleding) {
+ im->alphaBlendingFlag = 1;
+ }
+}
/*
* set the pixel at (x,y) and its 4-connected neighbors