From: Takeshi Abe Date: Mon, 19 Jan 2009 15:41:15 +0000 (+0000) Subject: fixed the bug of libgd #191 (A circle becomes square) X-Git-Tag: php-5.4.0alpha1~191^2~4469 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a98959be356982b1046c9183a16418e6dabcd97f;p=php fixed the bug of libgd #191 (A circle becomes square) --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 1f65e4469f..091e10b841 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1802,7 +1802,9 @@ void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c) a=w>>1; b=h>>1; - gdImageLine(im, mx-a, my, mx+a, my, c); + for (x = mx-a; x <= mx+a; x++) { + gdImageSetPixel(im, x, my, c); + } mx1 = mx-a;my1 = my; mx2 = mx+a;my2 = my; diff --git a/ext/gd/tests/libgd00191.phpt b/ext/gd/tests/libgd00191.phpt new file mode 100644 index 0000000000..6e3ffd51b1 --- /dev/null +++ b/ext/gd/tests/libgd00191.phpt @@ -0,0 +1,23 @@ +--TEST-- +libgd FS#191 (A circle becomes square) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Ok