#50036 [Opn->Asn]: imagefilledarc ignores angle when start and end are the same

From: Date: Tue, 08 Dec 2009 12:04:38 +0000
Subject: #50036 [Opn->Asn]: imagefilledarc ignores angle when start and end are the same
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145521@lists.php.net to get a copy of this message
ID: 50036 Updated by: felipe@php.net Reported By: gavin dot miller at areva-td dot com -Status: Open +Status: Assigned Bug Type: GD related Operating System: Windows XP PHP Version: 5.2.11 -Assigned To: +Assigned To: pajoye New Comment: This looks like was introduced by libgd/gd.c:rev.237682 (- Fixed regression introduced by the fix for the libgd bug#74) Previous Comments: ------------------------------------------------------------------------ [2009-10-29 16:46:47] gavin dot miller at areva-td dot com 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 this bug report at http://bugs.php.net/?id=50036&edit=1

« previous php.bugs (#145521) next »