超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<imagedestroyimagefill>
Last updated: Fri, 22 Jun 2007

imageellipse

(PHP 4 >= 4.0.6, PHP 5)

imageellipse -- 画一个椭圆

说明

int imageellipse ( resource image, int cx, int cy, int w, int h, int color)

imageellipse()image 所代表的图像中画一个中心为 cxcy(图像左上角为 0, 0)的椭圆。wh 分别指定了椭圆的宽度和高度,椭圆的颜色由 color 指定。

注: 本函数添加于 PHP 4.0.6 且需要 GD 2.0.2 或更高版本,可以在 http://www.boutell.com/gd/ 获得。

参见 imagearc()




add a note add a note User Contributed Notes
imageellipse
agentyoungsoo at hanmail dot net
05-Dec-2002 12:56
When you wana use "ImageEllipse" function
in under GD 2.0.2 version, you can use "ImageArc" like bellow

----------------------------------------------------
$file_name = "test.png";

$screen_x = 300;
$screen_y = 200;

$x1 = $screen_x / 2;
$y1 = $screen_y / 2;

$radius = 30;

$image = ImageCreate($screen_x, $screen_y);
$black = ImageColorAllocate($image, 0,0,0);

ImageArc($image, $x1, $y1, $radius , $radius , 0, 360, $black);

ImagePng($image, $file_name);
ImageDestroy($image);
----------------------------------------------------

<imagedestroyimagefill>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22