mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
- Fix #28506, negative angle returns "random arcs"
while (angle < 0) angle += 2*M_PI is used now
This commit is contained in:
parent
396bf39311
commit
5b71225f1b
@ -1605,9 +1605,14 @@ void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e
|
|||||||
int lx = 0, ly = 0;
|
int lx = 0, ly = 0;
|
||||||
int fx = 0, fy = 0;
|
int fx = 0, fy = 0;
|
||||||
|
|
||||||
|
while (s<0) {
|
||||||
|
s += 360;
|
||||||
|
}
|
||||||
|
|
||||||
while (e < s) {
|
while (e < s) {
|
||||||
e += 360;
|
e += 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = s; i <= e; i++) {
|
for (i = s; i <= e; i++) {
|
||||||
int x, y;
|
int x, y;
|
||||||
x = ((long) gdCosT[i % 360] * (long) w / (2 * 1024)) + cx;
|
x = ((long) gdCosT[i % 360] * (long) w / (2 * 1024)) + cx;
|
||||||
|
Loading…
Reference in New Issue
Block a user