English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
imagearc — 圆弧を描画するための関数。
bool imagearc ( resource $image , int $cx , int $cy , int $w , int $h , int $s , int $e , int $color )
imagearc() は cx、cy(左上隅が 0、0)を中心に image で表される画像に円弧を描きます。
w と h は円の幅と高さを指定し、始点と終点は s と e パラメータで角度で指定されます。0°は3時の位置にあります。時計回りに描画されます。
<?php $img = imagecreatetruecolor(200, 200);// 作成 200*200 画像 $white = imagecolorallocate($img, 255, 255, 255); // 色 // 円弧を描画 imagearc($img, 140, 75, 50, 50, 0, 360, $white); // ブラウザ出力画像 header("Content-type: image/png"); imagepng($img); imagedestroy($img); ?>