note 25028 added to function.imagefilledarc

From: Date: Sun, 08 Sep 2002 13:13:10 +0000
Subject: note 25028 added to function.imagefilledarc
Groups: php.notes 
Request: Send a blank email to php-notes+get-36338@lists.php.net to get a copy of this message
Here is how you can create a 3d looking pie: // create image $width = 100; $height = 100; $image = imagecreate($width, $height); $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); $gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0); $darkgray = imagecolorallocate($image, 0x90, 0x90, 0x90); $navy = imagecolorallocate($image, 0x00, 0x00, 0x80); $darknavy = imagecolorallocate($image, 0x00, 0x00, 0x50); $red = imagecolorallocate($image, 0xFF, 0x00, 0x00); $darkred = imagecolorallocate($image, 0x90, 0x00, 0x00); for ($i = 60;$i > 50;$i--) { imagefilledarc ($image, 50, $i, 100, 50, 0, 45, $darknavy, IMG_ARC_PIE); imagefilledarc ($image, 50, $i, 100, 50, 45, 75 , $darkgray, IMG_ARC_PIE); imagefilledarc ($image, 50, $i, 100, 50, 75, 360 , $darkred, IMG_ARC_PIE); } imagefilledarc ($image, 50, 50, 100, 50, 0, 45, $navy, IMG_ARC_PIE); imagefilledarc ($image, 50, 50, 100, 50, 45, 75 , $gray, IMG_ARC_PIE); imagefilledarc ($image, 50, 50, 100, 50, 75, 360 , $red, IMG_ARC_PIE); // flush image header("Content-type: image/png"); imagepng($image); imagedestroy($image); -- http://www.php.net/manual/en/function.imagefilledarc.php http://master.php.net/manage/user-notes.php?action=edit+25028 http://master.php.net/manage/user-notes.php?action=delete+25028 http://master.php.net/manage/user-notes.php?action=reject+25028

« previous php.notes (#36338) next »