|
imagefilledellipse (PHP 4 >= 4.0.6, PHP 5) imagefilledellipse -- 畫一橢圓並填充 說明bool imagefilledellipse ( resource image, int cx, int cy, int w, int h, int color )
imagefilledellipse() 在
image 所代表的圖像中以
cx,cy(圖像左上角為
0, 0)為中心畫一個橢圓。w 和 h
分別指定了橢圓的寬和高。橢圓用 color 彩色填充。若果成功則返回 TRUE,失敗則返回 FALSE。
例子 1. imagefilledellipse() 例子
<?php
// create a blank image $image = imagecreatetruecolor(400, 300);
// fill the background color $bg = imagecolorallocate($image, 0, 0, 0);
// choose a color for the ellipse $col_ellipse = imagecolorallocate($image, 255, 255, 255);
// draw the white ellipse imagefilledellipse($image, 200, 150, 300, 200, $col_ellipse);
// output the picture header("Content-type: image/png"); imagepng($image);
?>
|
|
參見 imageellipse() 和
imagefilledarc()。
| |