词条 | imageellipse |
释义 | 简介(PHP 4 >= 4.0.6, PHP 5)imageellipse -- 画一个椭圆 函数说明bool imageellipse ( resource image, int cx, int cy, int w, int h, int color ) imageellipse() 在 image 所代表的图像中画一个中心为 cx,cy(图像左上角为 0, 0)的椭圆。w 和 h 分别指定了椭圆的宽度和高度,椭圆的颜色由 color 指定。 使用范例例子 1. imageellipse()例子 <?php // 新建一个空白图像 $image = imagecreatetruecolor(400, 300); // 填充背景色 $bg = imagecolorallocate($image, 0, 0, 0); // 选择椭圆的颜色 $col_ellipse = imagecolorallocate($image, 255, 255, 255); // 画一个椭圆 imageellipse($image, 200, 150, 300, 200, $col_ellipse); // 输出图像 header("Content-type: image/png"); imagepng($image); ?> |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。