= 4.0.6, PHP 5, PHP 7, PHP 8)imagefilledellipse — 畫一橢圓并填充說(shuō)明imagefilledellipse( resource $image, int $cx, int $cy, ">

imagefilledellipse

(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)

imagefilledellipse畫一橢圓并填充

說(shuō)明

imagefilledellipse(
    resource $image,
    int $cx,
    int $cy,
    int $width,
    int $height,
    int $color
): bool

畫一橢圓并填充到指定的 image。

參數(shù)

image

由圖象創(chuàng)建函數(shù)(例如imagecreatetruecolor())返回的 GdImage 對(duì)象。

cx

中央的 x 坐標(biāo)。

cy

中央的 y 坐標(biāo)。

width

橢圓的寬度。

height

橢圓的高度。

color

要填充的顏色。顏色標(biāo)識(shí)由函數(shù) imagecolorallocate() 創(chuàng)建。

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 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);

?>

以上例程的輸出類似于:

例子輸出: imagefilledellipse()

注釋

參見(jiàn)