|
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);
?>
|
|
參見 imagefilledellipse() 和
imagearc()。
| |