array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.imagefilledellipse.php', 1 => 'imagefilledellipse', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'GD および Image 関数', ), 'prev' => array ( 0 => 'function.imagefilledarc.php', 1 => 'imagefilledarc', ), 'next' => array ( 0 => 'function.imagefilledpolygon.php', 1 => 'imagefilledpolygon', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/image/functions/imagefilledellipse.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)
imagefilledellipse — 塗りつぶされた楕円を描画する
$image
,$center_x
,$center_y
,$width
,$height
,$color
指定した image
の指定した座標を中心として楕円を描画します。
image
imagecreatetruecolor()のような画像作成関数が返す GdImage オブジェクト。
center_x
中心の x 座標。
center_y
中心の y 座標。
width
楕円の幅。
height
楕円の高さ。
color
塗りつぶし色。imagecolorallocate() で作成された色識別子。
バージョン | 説明 |
---|---|
8.0.0 |
image は、
GdImage
クラスのインスタンスを期待するようになりました。
これより前のバージョンでは、有効な gd resource が期待されていました。
|
例1 imagefilledellipse() の例
<?php
// 空の画像を作成します
$image = imagecreatetruecolor(400, 300);
// 背景色を塗ります
$bg = imagecolorallocate($image, 0, 0, 0);
// 楕円の色を選択します
$col_ellipse = imagecolorallocate($image, 255, 255, 255);
// 白い楕円を描画します
imagefilledellipse($image, 200, 150, 300, 200, $col_ellipse);
// 画像を出力します
header("Content-type: image/png");
imagepng($image);
?>
上の例の出力は、 たとえば以下のようになります。
注意:
imagefilledellipse() は imagesetthickness() を無視します。