1、imagecreatetruecolor() 函数用于创建一幅空白图像。 imagecreate() 和 imagecreatetruecolor() 函数用于创建一幅空白图像。
Bash
<?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/7545.html
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

微信扫码关注
更新实时通知