From a98959be356982b1046c9183a16418e6dabcd97f Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Mon, 19 Jan 2009 15:41:15 +0000 Subject: [PATCH] fixed the bug of libgd #191 (A circle becomes square) --- ext/gd/libgd/gd.c | 4 +++- ext/gd/tests/libgd00191.phpt | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ext/gd/tests/libgd00191.phpt 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 -- 2.50.1