imagefilledarc
imagefilledarc — 部分楕円を描画し、塗りつぶす
説明
bool imagefilledarc ( resource image, int cx, int cy, int width, int height, int start, int end, int color, int style )指定した image の指定した座標を中心とする、 部分楕円を描画します。
パラメータ
- image
- imagecreatetruecolor()
のような画像作成関数が返す画像リソース。
- cx
-
中心の x 座標。
- cy
-
中心の y 座標。
- width
-
弧の幅。
- height
-
弧の高さ。
- start
-
弧の開始角度。
- end
-
弧の終了角度。
0° は三時の方向で、そこから時計回りに数えます。
- color
-
imagecolorallocate()
で作成した色 ID。
- style
-
次の選択肢のビット和。
- IMG_ARC_PIE
- IMG_ARC_CHORD
- IMG_ARC_NOFILL
- IMG_ARC_EDGED
返り値
成功した場合に TRUE を、失敗した場合に FALSE を返します。例
例 931. 3D 風のパイを作成する
<?php
// 画像を作成します
$image = imagecreatetruecolor(100, 100);
// 色を割り当てます
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
$darkgray = imagecolorallocate($image, 0x90, 0x90, 0x90);
$navy = imagecolorallocate($image, 0x00, 0x00, 0x80);
$darknavy = imagecolorallocate($image, 0x00, 0x00, 0x50);
$red = imagecolorallocate($image, 0xFF, 0x00, 0x00);
$darkred = imagecolorallocate($image, 0x90, 0x00, 0x00);
// 3D 効果を作成します
for ($i = 60; $i > 50; $i--) {
imagefilledarc($image, 50, $i, 100, 50, 0, 45, $darknavy, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 45, 75 , $darkgray, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 75, 360 , $darkred, IMG_ARC_PIE);
}
imagefilledarc($image, 50, 50, 100, 50, 0, 45, $navy, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 45, 75 , $gray, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 75, 360 , $red, IMG_ARC_PIE);
// 画像を出力します
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>
上の例の出力は、たとえば
以下のようになります。
注意
注意: この関数は、GD 2.0.1 以降を必要とします (2.0.28 以降を推奨します)。固有名詞の分類
PHP |
flock mktime imagefilledarc Shockwave Flash 関数 fwrite |
Weblioに収録されているすべての辞書からimagefilledarcを検索する場合は、下記のリンクをクリックしてください。

- imagefilledarcのページへのリンク