]> granicus.if.org Git - php/commit
Fix #64641: imagefilledpolygon doesn't draw horizontal line
authorChristoph M. Becker <cmbecker69@gmx.de>
Sun, 19 Jun 2016 11:54:55 +0000 (13:54 +0200)
committerChristoph M. Becker <cmb@php.net>
Mon, 20 Jun 2016 13:17:52 +0000 (15:17 +0200)
commit4b4275059fd3d7f0840d238a92d8cd0cfe3292eb
tree45d3e8e3d82a612b66e6cce2198b8a6d3fb8082b
parent58797ab895235796e8363ecc8199ca5cb865b5c9
Fix #64641: imagefilledpolygon doesn't draw horizontal line

As has been reported, 1-dimensional horizontal filled polygons are not drawn
at all. That is caused by the scanline algorithm used for drawing filled
polygons which skips the drawing of horizontal edges, because that is
normally not necessary. If, however, the polygon consists of horizontal
edges only, that obviously doesn't work, so we add a special case handling.

That has also been fixed in libgd with
<https://github.com/libgd/libgd/commit/f9f10fa9>.
ext/gd/libgd/gd.c
ext/gd/tests/bug64641.phpt [new file with mode: 0644]
ext/gd/tests/bug64641.png [new file with mode: 0644]
ext/gd/tests/imagecolorallocatealpha_basic.phpt
ext/gd/tests/imagefilledarc_basic.phpt
ext/gd/tests/imagefilledarc_variation1.phpt
ext/gd/tests/imagefilledarc_variation2.phpt
ext/gd/tests/imagegammacorrect_basic.phpt
ext/gd/tests/imagegammacorrect_variation1.phpt
ext/gd/tests/imagetruecolortopalette_basic.phpt