(PECL imagick 2, PECL imagick 3)
ImagickDraw::circle — Draws a circle
$ox,$oy,$px,$py本函数还未编写文档,仅有参数列表。
Draws a circle on the image.
oxorigin x coordinate
oyorigin y coordinate
pxperimeter x coordinate
pyperimeter y coordinate
没有返回值。
示例 #1 ImagickDraw::circle() example
<?php
function circle($strokeColor, $fillColor, $backgroundColor, $originX, $originY, $endX, $endY) {
    //Create a ImagickDraw object to draw into.
    $draw = new \ImagickDraw();
    $strokeColor = new \ImagickPixel($strokeColor);
    $fillColor = new \ImagickPixel($fillColor);
    $draw->setStrokeOpacity(1);
    $draw->setStrokeColor($strokeColor);
    $draw->setFillColor($fillColor);
    $draw->setStrokeWidth(2);
    $draw->setFontSize(72);
    $draw->circle($originX, $originY, $endX, $endY);
    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);
    $imagick->setImageFormat("png");
    $imagick->drawImage($draw);
    header("Content-Type: image/png");
    echo $imagick->getImageBlob();
}
?>