: This article mainly introduces php: image processing-three-dimensional pie chart. if you are interested in PHP tutorials, please refer to it. Imagecreatetruecolor(600,450); // assign some colors $ 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); $ green =
Imagecolorallocate($ Image, 0,200, 0); // fill the canvas background color;
Imagefill($ Image, 180, $ green); // create a 3D effect for ($ I = 150; $ I>; $ I --){
Imagefilledarc($ Image, 250, $ I, 300,150, 0, 45, $ darknavy, IMG_ARC_PIE );
Imagefilledarc($ Image, 250, $ I, 300,150, 45, 75, $ darkgray, IMG_ARC_PIE );
Imagefilledarc($ Image, 250, $ I, 300,150, 75,360, $ darkred, IMG_ARC_PIE );}
Imagefilledarc($ Image, 250,150,300,150, 0, 45, $ navy, IMG_ARC_PIE );
Imagefilledarc($ Image, 250,150,300,150, 45, 75, $ gray, IMG_ARC_PIE );
Imagefilledarc($ Image, 250,150,300,150, 75,360, $ red, IMG_ARC_PIE); // output image
Header('Content-type: image/png ');
Imagepng($ Image );
Imagedestroy($ Image );
?>
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above introduces php: image processing-a three-dimensional pie chart, including the content, hope to be helpful to friends who are interested in PHP tutorials.