位置: 编程技术 - 正文

PHP:imagefilledpolygon()的用法_GD库图像处理函数

编辑:rootadmin
imagefilledpolygon

推荐整理分享PHP:imagefilledpolygon()的用法_GD库图像处理函数,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4, PHP 5)

imagefilledpolygon — 画一多边形并填充

说明 bool imagefilledpolygon ( resource $image , array $points , int $num_points , int $color )

imagefilledpolygon() 在 image 图像中画一个填充了的多边形。

PHP:imagefilledpolygon()的用法_GD库图像处理函数

points 参数是一个按顺序包含有多边形各顶点的 x 和 y 坐标的数组。

num_points 参数是顶点的总数,必须大于 3。

Example #1 imagefilledpolygon() 例子

<?php//建立多边形各顶点坐标的数组$values=array(,,//Point1(x,y),,//Point2(x,y),,//Point3(x,y),,//Point4(x,y),,//Point5(x,y),//Point6(x,y));//创建图像$image=imagecreatetruecolor(,);//设定颜色$bg=imagecolorallocate($image,,,);$blue=imagecolorallocate($image,0,0,);//画一个多边形imagefilledpolygon($image,$values,6,$blue);//输出图像header('Content-type:image/png');imagepng($image);imagedestroy($image);?>

PHP:imagefilledellipse()的用法_GD库图像处理函数 imagefilledellipse(PHP4=4.0.6,PHP5)imagefilledellipse画一椭圆并填充说明boolimagefilledellipse(resource$image,int$cx,int$cy,int$width,int$height,int$color)画一椭圆并填充到指定的imag

PHP:imagefill()的用法_GD库图像处理函数 imagefill(PHP4,PHP5)imagefill区域填充说明boolimagefill(resource$image,int$x,int$y,int$color)imagefill()在image图像的坐标x,y(图像左上角为0,0)处用color颜色执行区域填充

PHP:imagedestroy()的用法_GD库图像处理函数 imagedestroy(PHP4,PHP5)imagedestroy销毁一图像说明boolimagedestroy(resource$image)imagedestroy()释放与image关联的内存。image是由图像创建函数返回的图像标识符,例如imag

本文链接地址:https://www.jiuchutong.com/biancheng/288349.html 转载请保留说明!

上一篇:PHP:imagefilltoborder()的用法_GD库图像处理函数

下一篇:PHP:imagefilledellipse()的用法_GD库图像处理函数

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络