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 所代表的圖像中以 cxcy(圖像左上角為 0, 0)為中心畫一個橢圓。wh 分別指定了橢圓的寬和高。橢圓用 color 彩色填充。若果成功則返回 TRUE,失敗則返回 FALSE

例子 1. imagefilledellipse() 例子

<?php

// create a blank image
$image imagecreatetruecolor(400300);

// fill the background color
$bg imagecolorallocate($image000);

// choose a color for the ellipse
$col_ellipse imagecolorallocate($image255255255);

// draw the white ellipse
imagefilledellipse($image200150300200$col_ellipse);

// output the picture
header("Content-type: image/png");
imagepng($image);

?>

注: 本函數需要 GD 2.0.1 或更高版本。

參見 imageellipse()imagefilledarc()