How to use:
<?php
$width = 200;
$height = 200;
$border = 2;
$img = new Imagick();
$img->newImage( $width, $height, new ImagickPixel( 'transparent' ) );
$draw = new ImagickDraw();
$draw->setStrokeColor( new ImagickPixel( 'black' ) );
$draw->setStrokeWidth( 2 );
$draw->setFillColor( new ImagickPixel( 'transparent' ) );
// will fail in an obscure manner if the input data is invalid
$points = array
(
array( 'x' => 0, 'y' => 200 ),
array( 'x' => 0, 'y' => 0 ),
array( 'x' => 200, 'y' => 200 ),
array( 'x' => 200, 'y' => 0 )
);
$draw->bezier($points);
$img->drawImage( $draw );
$img->setImageFormat( "png" );
header( "Content-Type: image/png" );
echo $img;
?>
ImagickDraw::bezier
(PECL imagick 2.0.0)
ImagickDraw::bezier — Dessine une courbe de Bézier
Description
bool ImagickDraw::bezier
( array
$coordinates
)Avertissement
Cette fonction n'est pas documentée et seule la liste des arguments est disponible.
Dessine une courbe de Bézier, à l'ait d'une série de point de contrôle.
Liste de paramètres
-
coordinates -
Tableau multidimensionnel tel que array( array( 'x' => 1, 'y' => 2 ), array( 'x' => 3, 'y' => 4 ) )
Valeurs de retour
Aucune valeur n'est retournée.
zombiebovine at gmail dot com ¶
3 years ago
