86. php 绘图体系(2)
2016-01-15 22:05
716 查看
1.画圆柱
2.配置
下载:
http://jpgraph.net/download/
<?php //1.画布 //默认是黑色 $img = imagecreatetruecolor(400,300); $white = imagecolorallocate($img,255,255,255); imagefill($img,0,0,$white); //2.画扇形 //创建3个颜色 $red = imagecolorallocate($img,255,0,0); $blue = imagecolorallocate($img,0,0,128); $gray = imagecolorallocate($img,192,192,192); //暗色 $dardred = imagecolorallocate($img,144,0,0); $dardblue = imagecolorallocate($img,0,0,80); $dardgray = imagecolorallocate($img,144,144,144); for($i=60;$i>=40;$i--){ imagefilledarc($img,100,$i,100,60,0,35,$dardblue,IMG_ARC_PIE); imagefilledarc($img,100,$i,100,60,35,75,$dardgray,IMG_ARC_PIE); imagefilledarc($img,100,$i,100,60,75,360,$dardred,IMG_ARC_PIE); } //在上面加个盖,亮色 imagefilledarc($img,100,40,100,60,0,35,$blue,IMG_ARC_PIE); imagefilledarc($img,100,40,100,60,35,75,$gray,IMG_ARC_PIE); imagefilledarc($img,100,40,100,60,75,360,$red,IMG_ARC_PIE); //输出图片 header('content-type:image/png'); imagepng($img); imagedestroy($img);
2.配置
下载:
http://jpgraph.net/download/
相关文章推荐
- Laravel 向视图传递变量的3种方法
- 读书笔记--ContentProvider
- PHP 生成唯一编码字符的方法
- intl PHP extension is not working for windows解决方法
- ssh能够连接而sftp不能连接的解决方法
- php.ini xdebug 配置
- JRTPLib 运行库 runtime 不匹配
- Atitit.收银机小票打印功能的设计 java php c#.net版本
- Atitit.收银机小票打印功能的设计 java php c#.net版本
- Atitit.收银机小票打印功能的设计 java php c#.net版本
- Atitit,通过pid获取进程文件路径 java php c#.net版本大总结
- Atitit,通过pid获取进程文件路径 java php c#.net版本大总结
- Atitit. 二进制数据ascii表示法,与base64编码解码api 设计标准化总结java php c#.net
- Atitit. 二进制数据ascii表示法,与base64编码解码api 设计标准化总结java php c#.net
- Atitit,通过pid获取进程文件路径 java php c#.net版本大总结
- Atitit. 二进制数据ascii表示法,与base64编码解码api 设计标准化总结java php c#.net
- PHP超大文件下载,断点续传下载
- 关于cgi、FastCGI、php-fpm、php-cgi(复制)
- TP框架修改url模式后出现‘无法加载控制器’的错误
- 希尔排序算法的php实现