• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

php:图像处理—立体饼状图

php 搞代码 3年前 (2022-01-23) 10次浏览 已收录 0个评论

<?php// 创建图像$image = imagecreatetruecolor(600, 450);// 分配一些颜色$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);//填充画布背景颜色;imagefill($image,0,0,$green);// 创建 3D 效果for ($i = 180; $i > 150; $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,

……本2文来源gaodai.ma#com搞##代!^码@网3

搞代gaodaima码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);// 输出图像header(‘Content-type: image/png’);imagepng($image);imagedestroy($image);

?>

版权声明:本文为博主原创文章,未经博主允许不得转载。

以上就介绍了php:图像处理—立体饼状图,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:php:图像处理—立体饼状图
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址