Php: image processing-three-dimensional pie chart

Source: Internet
Author: User
Tags 0xc0
: 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.