note 37906 rejected from function.imagearc by didou

From: Date: Thu, 03 Feb 2005 20:03:40 +0000
Subject: note 37906 rejected from function.imagearc by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84477@lists.php.net to get a copy of this message
Note Submitter: support at icgaya dot com ---- Caution! ImageArc has bugs in it! First, you can not use negative value in start degree and/or end degree. Second, ImageArc may not draw a 'complete' arc as you required. Use the following code: $tmp_start = floor(180*$rad_start/pi()); $tmp_start = ($tmp_start>1.5*pi())? floor($tmp_start-0.7) : floor($tmp_start); ImageArc($image, $cx, $cy, $Ellipse["DX"], $Ellipse["DY"], $tmp_start, ceil(180*$rad_end/pi()+0.1), $border); to avoid the uncompleteness. (note the -0.7 and +0.1) This bug may be derived from the degree in ImageArc is an integer. I think it should be a float number.

« previous php.notes (#84477) next »