update : 2015.11.03
php.shukuma.com

검색:
 
 
Draws an ellipse on the image

ImagickDraw::ellipse

(PECL imagick 2.0.0)

ImagickDraw::ellipse — Draws an ellipse on the image

설명

bool ImagickDraw::ellipse ( float $ox , float $oy , float $rx , float $ry , float $start , float $end )
Warning

이 함수는 현재 문서화 되어있지 않습니다; 인수 목록만을 제공합니다.

Draws an ellipse on the image.

인수

ox

oy

rx

ry

start

end

반환값

값을 반환하지 않습니다.

예제

Example #1 ImagickDraw::ellipse()

<?php
function ellipse($strokeColor, $fillColor, $backgroundColor) {

    
$draw = new \ImagickDraw();
    
$draw->setStrokeColor($strokeColor);
    
$draw->setFillColor($fillColor);

    
$draw->setStrokeWidth(2);
    
$draw->setFontSize(72);

    
$draw->ellipse(125, 70, 100, 50, 0, 360);
    
$draw->ellipse(350, 70, 100, 50, 0, 315);

    
$draw->push();
    
$draw->translate(125, 250);
    
$draw->rotate(30);
    
$draw->ellipse(0, 0, 100, 50, 0, 360);
    
$draw->pop();

    
$draw->push();
    
$draw->translate(350, 250);
    
$draw->rotate(30);
    
$draw->ellipse(0, 0, 100, 50, 0, 315);
    
$draw->pop();

    
$imagick = new \Imagick();
    
$imagick->newImage(500, 500, $backgroundColor);
    
$imagick->setImageFormat("png");

    
$imagick->drawImage($draw);

    
header("Content-Type: image/png");
    echo 
$imagick->getImageBlob();
}

?>