脚本宝典收集整理的这篇文章主要介绍了PHP实现绘制3D扇形统计图及图片缩放实例,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。<PRe class="brush: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,请注明来意。