ImagickDraw::arc
(PECL imagick 2, PECL imagick 3)
ImagickDraw::arc — 円弧を描画する
説明
public ImagickDraw::arc
( float $sx
, float $sy
, float $ex
, float $ey
, float $sd
, float $ed
) : bool
警告 この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
画像上の指定した矩形内に円弧を描画します。
パラメータ
sx
- 矩形の開始位置の x 座標。
sy
- 矩形の開始位置の y 座標。
ex
- 矩形の終了位置の x 座標。
ey
- 矩形の終了位置の y 座標。
sd
- 開始位置の角度。
ed
- 終了位置の角度。
返り値
値を返しません。
例
例1 ImagickDraw::arc()
<?phpfunction arc($strokeColor, $fillColor, $backgroundColor, $startX, $startY, $endX, $endY, $startAngle, $endAngle) { //Create a ImagickDraw object to draw into. $draw = new \ImagickDraw(); $draw->setStrokeWidth(1); $draw->setStrokeColor($strokeColor); $draw->setFillColor($fillColor); $draw->setStrokeWidth(2); $draw->arc($startX, $startY, $endX, $endY, $startAngle, $endAngle); //Create an image object which the draw commands can be rendered into $image = new \Imagick(); $image->newImage(IMAGE_WIDTH, IMAGE_HEIGHT, $backgroundColor); $image->setImageFormat("png"); //Render the draw commands in the ImagickDraw object //into the image. $image->drawImage($draw); //Send the image to the browser header("Content-Type: image/png"); echo $image->getImageBlob();}?>