imagefilledellipse
(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)
imagefilledellipse — 畫一橢圓並填充
說明
   imagefilledellipse(
resource
int
int
int
int
int
): bool
  resource
$image,int
$cx,int
$cy,int
$width,int
$height,int
$color): bool
   畫一橢圓並填充到指定的 image。
  
參數
- 
image
- 
由圖像建立函式(例如imagecreatetruecolor())返回的 GdImage 對象。 
- 
cx
- 
      中央的 x 座標。 
- 
cy
- 
      中央的 y 座標。 
- 
width
- 
      橢圓的寬度。 
- 
height
- 
      橢圓的高度。 
- 
color
- 
      要填充的顏色。顏色標識由函式 imagecolorallocate() 建立。 
返回值
   成功時返回 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);
?>
以上例程的輸出類似於:
