位置: 编程技术 - 正文

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

编辑:rootadmin
imagesetstyle

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

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

(PHP 4 >= 4.0.6, PHP 5)

imagesetstyle — 设定画线的风格

说明 bool imagesetstyle ( resource $image , array $style )

imagesetstyle() 设定所有画线的函数(例如 imageline() 和 imagepolygon())在使用特殊颜色 IMG_COLOR_STYLED 或者用 IMG_COLOR_STYLEDBRUSHED 画一行图像时所使用的风格。

参数

image

由图象创建函数(例如imagecreatetruecolor())返回的图象资源。

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

像素组成的数组。你可以通过常量 IMG_COLOR_TRANSPARENT 来添加一个透明像素。

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE。

范例

下面的示例脚本在画布上从左上角到右下角画一行虚线:

Example #1 imagesetstyle() 例子

<?phpheader("Content-type:image/jpeg");$im=imagecreatetruecolor(,);$w=imagecolorallocate($im,,,);$red=imagecolorallocate($im,,0,0);/*画一条虚线,5个红色像素,5个白色像素*/$style=array($red,$red,$red,$red,$red,$w,$w,$w,$w,$w);imagesetstyle($im,$style);imageline($im,0,0,,,IMG_COLOR_STYLED);/*用imagesetbrush()和imagesetstyle画一行笑脸*/$style=array($w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$red);imagesetstyle($im,$style);$brush=imagecreatefrompng("

以上例程的输出类似于:

参见

imagesetbrush() - 设定画线用的画笔图像 imageline() - 画一条线段

PHP:imagesetthickness()的用法_GD库图像处理函数 imagesetthickness(PHP4=4.0.6,PHP5)imagesetthickness设定画线的宽度说明boolimagesetthickness(resource$image,int$thickness)imagesetthickness()把画矩形,多边形,椭圆等等时所用的

PHP:imagestringup()的用法_GD库图像处理函数 imagestringup(PHP4,PHP5)imagestringup垂直地画一行字符串说明boolimagestringup(resource$image,int$font,int$x,int$y,string$s,int$col)imagestring()用col颜色将字符串s垂直地画到image

PHP:imagesetpixel()的用法_GD库图像处理函数 imagesetpixel(PHP4,PHP5)imagesetpixel画一个单一像素说明boolimagesetpixel(resource$image,int$x,int$y,int$color)imagesetpixel()在image图像中用color颜色在x,y坐标(图像左上角为

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

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

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

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

鄂ICP备2023003026号

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

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