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

php画一个背景透明,且开始处旋转到在圆_php

php 搞代码 7年前 (2018-06-21) 119次浏览 已收录 0个评论
/*  * _survey 得到一个投票的圆饼图 * @access public 表示函数对外公开 * @param $_agree 同意票数 * @param $_disagree 反对票数 * return 一张统计圆饼图 * */ function _vote($_agree,$_disagree){     //处理参数     if($_agree==0&&$_disagree==0){         $_vote = 270;     }     if($_agree==0&&$_disagree!=0){         $_vote = 91;     }     if($_agree!=0&&$_disagree==0){         $_vote = 89;     }     if($_agree!=0&&$_disagree!=0){         $_vote = intval(360*($_agree/($_agree+$_disagree))+90);     }     //创建画布     $_img=imagecreatetruecolor(150,100);     //填充透明背景     imagealphablending($_img, false);     imagesavealpha($_img, true);     $white = imagecolorallocatealpha($_img,255,255,255,127);     imagefill($_img,0,0,$white);     //创建颜色     $_green=imagecolorallocate($_img,180,210,52);     $_blue=imagecolorallocate($_img,83,201,237);     $_gary=imagecolorallocate($_img,192,192,192);     $_green1=imagecolorallocate($_img,149,178,36);     $_blue1=imagecolorallocate($_img,41,160,193);     $_gary1=imagecolorallocate($_img,144,144,144);          for($i=60;$i>=50;$i--){         imagefilledarc($_img,100,$i,100,50,90,$_vote,$_blue1,IMG_ARC_PIE);         imagefilledarc($_img,100,$i,100,50,$_vote,90,$_green1,IMG_ARC_PIE);      }          imagefilledarc($_img,100,$i,100,50,90,$_vote,$_blue,IMG_ARC_PIE);     imagefilledarc($_img,100,$i,100,50,$_vote,90,$_green,IMG_ARC_PIE);          header("content-type: image.png" title="php画一个背景透明,且开始处旋转到在圆_php");     imagepng($_img);     imagedestroy($_img); }

欢迎大家阅读php画一个背景透明,且开始处旋转到在圆_php》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码


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

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

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

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