note 37906 added to function.imagearc

From: Date: Tue, 02 Dec 2003 01:39:57 +0000
Subject: note 37906 added to function.imagearc
Groups: php.notes 
Request: Send a blank email to php-notes+get-61238@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.imagearc.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37906 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37906&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37906&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#61238) next »