PHP   发布时间:2022-04-09  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了PHP实现绘制3D扇形统计图及图片缩放实例大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

1、利用PHP gd库的函数绘制3D扇形统计

PHP;">
  

/设置画布需要的颜色/
$white = imagecolorallocate($image,0xff,0xff);
$gray = imagecolorallocate($image,0xc0,0xc0);
$darkgray = imagecolorallocate($image,0x90,0x90);
$navy = imagecolorallocate($image,0x00,0x80);
$darknavy = imagecolorallocate($image,0x50);
$red = imagecolorallocate($image,0x00);
$darkred = imagecolorallocate($image,0x00);

/填充背景色/
imagefill($image,$white);

/3D制作/
for($i = 60; $i > 50; $i--)
{
imagefilledarc($image,50,$i,100,-160,40,$darknavy,IMG_ARC_PIE);
imagefilledarc($image,75,$darkgray,200,$darkred,IMG_ARC_PIE);
}
/画椭圆弧并填充/
imagefilledarc($image,IMG_ARC_PIE);
imagefilledarc($image,IMG_ARC_PIE);

/画字符串/
imagestring($image,3,15,55,"30%",$white);
imagestring($image,45,35,"60%",60,"10%",$white);

/输出图像/
header("content-type:image/png");
imagepng($imagE);

/释放资源/
imagedestroy($imagE);
?>

大佬总结

以上是大佬教程为你收集整理的PHP实现绘制3D扇形统计图及图片缩放实例全部内容,希望文章能够帮你解决PHP实现绘制3D扇形统计图及图片缩放实例所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:图片缩放