summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_block_alloc.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmb@php.net>2016-07-16 20:42:47 +0200
committerChristoph M. Becker <cmb@php.net>2016-07-19 17:38:26 +0200
commit828f911efd7cde5c18f36b1339573866663193f1 (patch)
tree8a33617c03e612a0a3f5af17021b00a49e7bca7b /ext/mysqlnd/mysqlnd_block_alloc.c
parentbd1919504b19ada4f801d2fe939e79a07006c52a (diff)
downloadphp-git-828f911efd7cde5c18f36b1339573866663193f1.tar.gz
Fix #43828: broken transparency of imagearc for truecolor in blendingmode
No pixel of a filled arc must ever be drawn multiple times. Otherwise we get artifacts regarding transparency. That happens with the current implementation of gdImageFilledArc() unless gdChord or gdNoFill are set. When gdPie is set, however, the filled arc is drawn in wedges, which are polygons of three points, and so some overlap is natural. To resolve the issue, we stick with the current algorithm of calculating the wedges, but instead of drawing each polygon separately, we put the relevant points in a large array, and draw a single polygon. That also is supposed to improve the performance considerably. Note that this modification will change the results when gdImageSetStyle() or gdImageSetBrush() are used, but we believe that this modification is also an improvement in this regard, even though it still might not make much sense to use these functions with gdImageFilledArc(). The respective fix for libgd is <https://github.com/libgd/libgd/commit/e7e20d6>.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_block_alloc.c')
0 files changed, 0 insertions, 0 deletions