首页 期权学习期权知识正文

绘制图形示例

xiaojiucai 期权知识 2020-08-18 405 0
<?php
$im = imagecreatetruecolor(100,100);  //imagecreatetruecolor() 函数用于创建一幅空白图像。   imagecreate() 和 imagecreatetruecolor() 函数用于创建一幅空白图像。
$red = imagecolorallocate($im,255,0,0); //红色
$green = imagecolorallocate($im,0,255,0);//绿色
$blue = imagecolorallocate($im,0,0,255); //蓝色

//magefilledarc 画椭圆弧且填充
imagefilledarc($im,50,50,100,100,0,75,$red,IMG_ARC_PIE); //弧线   弧线连圆弧两端  IMG_ARC_PIE和IMG_ARC_CHORD(直线连接两端)是互斥的
imagefilledarc($im,50,50,100,100,75,123,$green,IMG_ARC_PIE);
imagefilledarc($im,50,50,100,100,123,360,$blue,IMG_ARC_PIE);//50,50 X,Y轴。  100,100 宽高     123,360  从123度到360度
//$blue,用上面的蓝色,   IMG_ARC_PIE 弧线

header('content-type:image/png');
imagepng($im);
imagedestroy($im);
?>

原文链接:https://www.qiquanji.com/post/7756.html

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

微信扫码关注

更新实时通知

版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

评论