<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head>
<card title="PHP如何绘制3D扇形统计图表及图片缩放的实例代码（imagecreatetruecolor）" id="card1">
<p> 游客</p><p>
标题:PHP如何绘制3D扇形统计图表及图片缩放的实例代码（imagecreatetruecolor）<br/>
正文:<br/>
1、利用php gd库的函数绘制3D扇形统计图  &amp;lt;?php  header(&amp;quot;content-type&amp;quot;,&amp;quot;text/html;charset=utf-8&amp;quot;);  /*扇形统计图@camnpr*/  $image = imagecreatetruecolor(100, 100);  /*创建画布*/    /*设置画布需要的颜色*/  $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);   /*填充背景色*/  imagefill($image, 0, 0, $white);   /*3D制作@郑州网建*/  for($i = 60; $i &amp;gt; 50; $i--)  {    imagefilledarc($image, 50, $i, 100, 50, -160, 40, $darknavy, IMG_ARC_PIE);    imagefilledarc($image, 50, $i, 100, 50, 40, 75, $darkgray, IMG_ARC_PIE);    imagefilledarc($image, 50, $i, 100, 50, 75, 200, $darkred, IMG_ARC_PIE);  }  /*画椭圆弧并填充*/  imagefilledarc($image, 50, 50, 100, 50, -160, 40, $darknavy, IMG_ARC_PI<br/><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=1794&amp;Page=1">[&lt;&lt;]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=1794&amp;Page=1">[[1]]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=1794&amp;Page=2">[2]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=1794&amp;Page=3">[3]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=1794&amp;Page=3">[&gt;&gt;]</a><br/>
<br/>
<a href="wap.asp?act=Com&amp;id=1794">查看评论(0)</a><br/>
<a href="wap.asp?act=AddCom&amp;inpId=1794">发表评论</a><br/><br/>

<br/>

<br/>
<a href="http://camnpr.com/wap.asp">首页</a>
</p>
</card>
</wml>