summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2009-07-28 20:35:06 +0000
committerKalle Sommer Nielsen <kalle@php.net>2009-07-28 20:35:06 +0000
commitb5b83031942fca0983faabd3e70babc1f707b777 (patch)
tree313511b8418310432f2508c181a57c1191de73c2 /ext/gd
parent34d8ee27ccfe92c8281ff7001d8737881557981d (diff)
downloadphp-git-b5b83031942fca0983faabd3e70babc1f707b777.tar.gz
Fixed bug #42434 (ImageLine w/ antialias = 1px shorter)
- patch by wojjie at gmail dot com
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/libgd/gd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 1f5c82b0e7..5b4f923596 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1358,7 +1358,7 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
x = x1 << 16;
y = y1 << 16;
inc = (dy * 65536) / dx;
- while ((x >> 16) < x2) {
+ while ((x >> 16) <= x2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 8) & 0xFF);
if ((y >> 16) + 1 < im->sy) {
gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF);
@@ -1380,7 +1380,7 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
x = x1 << 16;
y = y1 << 16;
inc = (dx * 65536) / dy;
- while ((y>>16) < y2) {
+ while ((y>>16) <= y2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 8) & 0xFF);
if ((x >> 16) + 1 < im->sx) {
gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);