#24798 [Csd->Bgs]: imagefilledpolygon doesn't antialias

From: Date: Fri, 25 Jul 2003 09:37:42 +0000
Subject: #24798 [Csd->Bgs]: imagefilledpolygon doesn't antialias
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-44749@lists.php.net to get a copy of this message
ID: 24798 Updated by: sniper@php.net Reported By: phpbug at webwidgets dot net -Status: Closed +Status: Bogus Bug Type: GD related Operating System: Debian woody PHP Version: 4CVS-2003-07-24 (stable) New Comment: expected behaviour -> not bug -> bogus. Previous Comments: ------------------------------------------------------------------------ [2003-07-25 04:10:00] pajoye@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Filled polygon does not support antialiasing. pierre ------------------------------------------------------------------------ [2003-07-24 23:43:50] phpbug at webwidgets dot net 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24798&edit=1

« previous php.bugs (#44749) next »