imagefill
imagefill — 塗り潰す
説明
bool imagefill ( resource image, int x, int y, int color )指定した座標 (左上が 0, 0 です) から、指定した色 color で image を塗りつぶします。
パラメータ
- image
- imagecreatetruecolor()
のような画像作成関数が返す画像リソース。
- x
-
開始位置の x 座標。
- y
-
開始位置の y 座標。
- color
-
塗りつぶし色。
imagecolorallocate()
で作成した色 ID です。
返り値
成功した場合に TRUE を、失敗した場合に FALSE を返します。例
例 930. imagefill() の例
<?php
$im = imagecreatetruecolor(100, 100);
// 背景色を赤に設定します
$red = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 0, 0, $red);
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
上の例の出力は、たとえば
以下のようになります。
参考
imagecolorallocate() |
固有名詞の分類
Weblioに収録されているすべての辞書からImage Fillを検索する場合は、下記のリンクをクリックしてください。

- Image Fillのページへのリンク