ImagickDraw::roundRectangle

(PECL imagick 2, PECL imagick 3)

ImagickDraw::roundRectangleKöşeleri yuvarlatılmış bir dikdörtgen çizer

Açıklama

public ImagickDraw::roundRectangle(
    float $x1,
    float $y1,
    float $x2,
    float $y2,
    float $rx,
    float $ry
): bool
Uyarı

Bu işlev hala belgelendirilmemiştir; sadece değiştirge listesi mevcuttur.

Köşegen koordinatları belirtilen dikdörtgeni, köşelerini x ve y yarıçaplarına göre yuvarlatarak çizer. Çizim için geçerli çizgi türü, çizgi kalınlığı ve dolgu ayarları kullanılır.

Değiştirgeler

x1

Sol üst köşenin X konumu.

y1

Sol üst köşenin Y konumu.

x2

Sağ alt köşenin X konumu.

y2

Sağ alt köşenin Y konumu.

rx

x yarıçapı

ry

y yarıçapı

Dönen Değerler

Hiçbir değer dönmez.

Örnekler

Örnek 1 - ImagickDraw::roundRectangle() örneği

<?php
function roundRectangle($strokeColor$fillColor$backgroundColor$startX$startY$endX$endY$roundX$roundY) {

    
$draw = new \ImagickDraw();

    
$draw->setStrokeColor($strokeColor);
    
$draw->setFillColor($fillColor);
    
$draw->setStrokeOpacity(1);
    
$draw->setStrokeWidth(2);

    
$draw->roundRectangle($startX$startY$endX$endY$roundX$roundY);

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

    
$imagick->drawImage($draw);

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

?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top