#50036 [NEW]: imagefilledarc ignores angle when start and end are the same

From: Date: Thu, 29 Oct 2009 16:46:48 +0000
Subject: #50036 [NEW]: imagefilledarc ignores angle when start and end are the same
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-144080@lists.php.net to get a copy of this message
From: gavin dot miller at areva-td dot com Operating system: Windows XP PHP version: 5.2.11 PHP Bug Type: GD related Bug description: imagefilledarc ignores angle when start and end are the same Description: ------------ When doing a imagefilledarc where the start and end angle are the same the angle is ignored and zero is used instead. Just upgraded from PHP 5.1.4 to 5.2.11 Using 5.1.4 the function would correctly position a line at the request angle with 5.2.11 zero is always used. the start and end must be at least 1 degree different to produce the correct result. Reproduce code: --------------- --- From manual page: function.imagefilledarc#Description --- <?php $img = imagecreate(200, 200); $white = imagecolorallocate($img, 255, 255, 255); $blue = imagecolorallocate($img, 153, 204, 255); $black = imagecolorallocate($img, 0, 0, 0); imagefilledarc($img, 100, 100, 175, 175,0,360, $blue,IMG_ARC_PIE); imagefilledarc($img, 100, 100, 175, 175, 150,150, $black,IMG_ARC_PIE|IMG_ARC_NOFILL |IMG_ARC_EDGED); header("Content-type: image/png"); imagepng($img); imagedestroy($img); ?> Expected result: ---------------- blue circle with black line drawn at 150degrees Actual result: -------------- blue circle with black line drawn at 0degrees -- Edit bug report at http://bugs.php.net/?id=50036&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50036&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50036&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50036&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50036&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50036&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50036&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50036&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50036&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50036&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50036&r=support Expected behavior: http://bugs.php.net/fix.php?id=50036&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50036&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50036&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50036&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50036&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50036&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50036&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50036&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50036&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50036&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50036&r=mysqlcfg

« previous php.bugs (#144080) next »