微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

将文本添加到 php 绘图

如何解决将文本添加到 php 绘图

我有这个代码,我想添加一个显示在弧形(房子的门)上方的文本,但是我在添加它时遇到了困难。任何人都可以帮忙吗?我已经添加了我的代码

header("Content-type: image/png");
$img_width=800;
$img_height=800;
$img=imagecreatetruecolor($img_width,$img_height);
$white=imagecolorallocate($img,0);
$black=imagecolorallocate($img,255,255);
$red=imagecolorallocate($img,0);
$yellow=imagecolorallocate($img,0);
$blue=imagecolorallocate($img,255);
$orange=imagecolorallocate($img,200,0);
imagefill($img,10,$white);
imagerectangle($img,$img_width*2/10,$img_height*5/10,$img_width*4/10,$img_height*8/10,$red);
imagefill($img,15,$blue);
imagepolygon($img,[$img_width*3/10,$img_height*2/10,$img_height*5/10],3,$yellow);
imagefill($img,$yellow);
imagearc($img,$img_width*3/10,100,180,360,$red);
 imagefill($img,$orange);
imagepng($img);
?>````

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。