diff options
author | Pierre Joye <pajoye@php.net> | 2004-05-24 20:03:08 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2004-05-24 20:03:08 +0000 |
commit | 30b2af951128cb522dabeed775c8baf7091efebb (patch) | |
tree | 638152ab6e96d520133db797ee5a95d72a57552f | |
parent | 03edfa1677a0827a0d391a54213b5c485105ac08 (diff) | |
download | php-git-30b2af951128cb522dabeed775c8baf7091efebb.tar.gz |
- MFH: Fix #28506, negative angle returns "random arcs"
while (s < 0) s += 360 is used now
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/gd/libgd/gd.c | 5 |
2 files changed, 7 insertions, 0 deletions
@@ -15,6 +15,8 @@ PHP 4 NEWS and/or HTTP_SESSION_VARS. (Sara) - Fixed bug #28508 (Do not make hypot() available if not supported by libc). (Ilia) +- Fixed bug #28506 (Allow negative start angle in imagearc and imagefilledarc. + (Pierre) - Fixed bug #28386 (wordwrap() wraps lines 1 character too soon). (Ilia) - Fixed bug #28374 (Possible unterminated loop inside _php_pgsql_trim_message()). (Ilia) diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 5ad1f12e87..3eb846cee1 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1607,9 +1607,14 @@ void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e int lx = 0, ly = 0; int fx = 0, fy = 0; + while (s<0) { + s += 360; + } + while (e < s) { e += 360; } + for (i = s; i <= e; i++) { int x, y; x = ((long) gdCosT[i % 360] * (long) w / (2 * 1024)) + cx; |