位置: 编程技术 - 正文

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

编辑:rootadmin
imagefilledarc

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

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

(PHP 4 >= 4.0.6, PHP 5)

imagefilledarc — 画一椭圆弧且填充

说明 bool imagefilledarc ( resource $image , int $cx , int $cy , int $width , int $height , int $start , int $end , int $color , int $style )

在指定的 image 上画一椭圆弧且填充。

参数

image

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

cx

中间的 x 坐标。

cy

中间的 y 坐标。

width

椭圆弧的宽度。

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

椭圆弧的高度。

start

起点角度。

end

终点角度。 0° is located at the three-o&#;clock position, and the arc is drawn clockwise.

color

imagecolorallocate() 创建的颜色标识符。

style

值可以是下列值的按位或(OR): IMG_ARC_PIE IMG_ARC_CHORD IMG_ARC_NOFILL IMG_ARC_EDGED IMG_ARC_PIE 和 IMG_ARC_CHORD 是互斥的;IMG_ARC_CHORD 只是用直线连接了起始和结束点,IMG_ARC_PIE 则产生圆形边界。IMG_ARC_NOFILL 指明弧或弦只有轮廓,不填充。IMG_ARC_EDGED 指明用直线将起始和结束点与中心点相连,和 IMG_ARC_NOFILL 一起使用是画饼状图轮廓的好方法(而不用填充)。

返回值

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

范例

Example #1 创建一 3D 效果的饼状图

<?php//创建图像$image=imagecreatetruecolor(,);//分配一些颜色$white=imagecolorallocate($image,0xFF,0xFF,0xFF);$gray=imagecolorallocate($image,0xC0,0xC0,0xC0);$darkgray=imagecolorallocate($image,0x,0x,0x);$navy=imagecolorallocate($image,0x,0x,0x);$darknavy=imagecolorallocate($image,0x,0x,0x);$red=imagecolorallocate($image,0xFF,0x,0x);$darkred=imagecolorallocate($image,0x,0x,0x);//创建3D效果for($i=;$i>;$i--){imagefilledarc($image,,$i,,,0,,$darknavy,IMG_ARC_PIE);imagefilledarc($image,,$i,,,,,$darkgray,IMG_ARC_PIE);imagefilledarc($image,,$i,,,,,$darkred,IMG_ARC_PIE);}imagefilledarc($image,,,,,0,,$navy,IMG_ARC_PIE);imagefilledarc($image,,,,,,,$gray,IMG_ARC_PIE);imagefilledarc($image,,,,,,,$red,IMG_ARC_PIE);//输出图像header('Content-type:image/png');imagepng($image);imagedestroy($image);?>

以上例程的输出类似于:

注释

Note: 此函数需要 GD 2.0.1 或更高版本(推荐 2.0. 及更高版本)。

PHP:imagefontheight()的用法_GD库图像处理函数 imagefontheight(PHP4,PHP5)imagefontheight取得字体高度说明intimagefontheight(int$font)返回指定字体一个字符高度的像素值。参见imagefontwidth()和imageloadfont()。

PHP:imageflip()的用法_GD库图像处理函数 imageflip(PHP5=5.5.0)imageflipFlipsanimageusingagivenmode说明boolimageflip(resource$image,int$mode)Flipstheimageimageusingthegivenmode.参数image由图象创建函数(例如imagecreatetruecolor())

PHP:imagefilter()的用法_GD库图像处理函数 imagefilter(PHP5)imagefilter对图像使用过滤器说明boolimagefilter(resource$src_im,int$filtertype[,int$arg1[,int$arg2[,int$arg3]]])imagefilter()把过滤器filtertype应用到图像上,在需

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

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

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

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

鄂ICP备2023003026号

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

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