|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-25 04:10 UTC] pajoye@php.net
[2003-07-25 04:37 UTC] sniper@php.net
[2003-07-25 12:02 UTC] phpbug at webwidgets dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
Description: ------------ When creating images, if antialias is enabled with imageantialias() lines and polygons are drawn with antialiasing, but filled polygons are not. PHP version used is latest stable CVS with bundled GD library. Reproduce code: --------------- <?php $image = imagecreatetruecolor(400, 250); imageantialias($image, TRUE); $bg = imagecolorallocate($image, 255, 255, 255); imagefill($image, 0, 0, $bg); $points[] = 50; $points[] = 75; $points[] = 100; $points[] = 200; $points[] = 350; $points[] = 50; $color = imagecolorallocate($image, 200, 0, 0); imagefilledpolygon($image, $points, 3, $color); header('Content-type: image/png'); imagepng($image); ?> Expected result: ---------------- The outside lines of the polygon in the image created by the above code should be antialiased. Actual result: -------------- The outside lines of the polygon appear the same as they do when antialiasing is turned off. If you substitute imagepolygon for imagefilledpolygon, you will see that the unfilled polygon is indeed drawn antialiased; this is what I had expected to see.