ImagickDraw::roundRectangle

(PECL imagick 2, PECL imagick 3)

ImagickDraw::roundRectangleDessine un rectangle aux coins arrondis

Description

public ImagickDraw::roundRectangle(
    float $top_left_x,
    float $top_left_y,
    float $bottom_right_x,
    float $bottom_right_y,
    float $rounding_x,
    float $rounding_y
): bool
Avertissement

Cette fonction est actuellement non documentée ; seule la liste des arguments est disponible.

Dessine un rectangle aux coins arrondis, à partir de deux coordonnées, x & y, du rayon de coin et en utilisant le trait courant, son épaisseur et sa couleur de remplissage.

Liste de paramètres

top_left_x

L'abscisse du coin supérieur gauche

top_left_y

L'ordonnée du coin supérieur gauche

bottom_right_x

L'abscisse du coin inférieur droit

bottom_right_y

L'ordonnée du coin inférieur droit

rounding_x

Le rayon en x

rounding_y

Le rayon en y

Valeurs de retour

Aucune valeur n'est retournée.

Exemples

Exemple #1 Exemple avec ImagickDraw::roundRectangle()

<?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(500, 500, $backgroundColor);
$imagick->setImageFormat("png");

$imagick->drawImage($draw);

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

?>

add a note

User Contributed Notes

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