]> granicus.if.org Git - php/commit
Fix #73614: gdImageFilledArc() doesn't properly draw pies
authorChristoph M. Becker <cmbecker69@gmx.de>
Wed, 16 Jan 2019 19:10:04 +0000 (20:10 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 16 Jan 2019 19:10:04 +0000 (20:10 +0100)
commit61cfa34e1194b5a026548508f9f34d6f6a8774da
tree64e020c0c60acb1a71d76326c80adda3b667a96a
parent5ac9990ddf0521b1c79b5e061a342a6dfb53d30c
Fix #73614: gdImageFilledArc() doesn't properly draw pies

The fix for PHP bug 43828[1] changed the algorithm from drawing filled
pies from drawing multiple triangles to drawing a single polygon.  Due
to quirks of the filled polygon drawing algorithm, we had to filter out
extraneous vertices.  This lead, however, to a bug regarding displaced
starting and ending points near 90° and 270° degrees, which we fix by
reinserting these vertices if they had been removed.

This fix is a port of libgd/libgd@1406b1a.

[1] <https://bugs.php.net/bug.php?id=43828>
NEWS
ext/gd/libgd/gd.c
ext/gd/tests/bug73614.phpt [new file with mode: 0644]
ext/gd/tests/bug73614.png [new file with mode: 0644]