位置: 编程技术 - 正文
推荐整理分享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像素组成的数组。你可以通过常量 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坐标(图像左上角为
标签: PHP:imagesetstyle()的用法_GD库图像处理函数
本文链接地址:https://www.jiuchutong.com/biancheng/284747.html 转载请保留说明!友情链接: 武汉网站建设