Bug #847: imagearc fails with arc from 0 to 360 degrees

From: Date: Thu, 15 Oct 1998 06:14:06 +0000
Subject: Bug #847: imagearc fails with arc from 0 to 360 degrees
Groups: php.dev 
Request: Send a blank email to php-dev+get-1845@lists.php.net to get a copy of this message
From: leon@clearink.com Operating system: Solaris and Windows NT PHP version: 3.0.5 PHP Bug Type: Misbehaving function Bug description: imagearc fails with arc from 0 to 360 degrees The following script creates a solid black circle in PHP 3.0.4, but in 3.0.5 the call to imagearc fails. It appears I can draw an arc of at most 360 degrees, which is insufficent for creating a closed loop on circles with diameters bigger than about 200 pixels. Looks like an off-by-one bug. <? $ChartDiameter = 300; $ChartWidth = $ChartDiameter + 20; $ChartHeight = $ChartDiameter + 20 + (($ChartFontHeight + 2) * count($ChartData)); $ChartCenterX = $ChartDiameter/2 + 10; $ChartCenterY = $ChartDiameter/2 + 10; //create image $image = imagecreate($ChartWidth, $ChartHeight); //allocate colors $colorBody = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); $colorBorder = imagecolorallocate($image, 0x00, 0x00, 0x00); //fill background imagefill($image, 0, 0, $colorBody); //draw border imagearc($image, $ChartCenterX, $ChartCenterY, $ChartDiameter+7, $ChartDiameter+7, 0, 360, $colorBorder); imagefilltoborder($image, $ChartCenterX, $ChartCenterY, $colorBorder, $colorBorder); //output image header("Content-type: image/gif"); imagegif($image); ?> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#1845) next »