array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'imagickdraw.setstrokelinecap.php', 1 => 'ImagickDraw::setStrokeLineCap', 2 => 'Specifies the shape to be used at the end of open subpaths when they are stroked', ), 'up' => array ( 0 => 'class.imagickdraw.php', 1 => 'ImagickDraw', ), 'prev' => array ( 0 => 'imagickdraw.setstrokedashoffset.php', 1 => 'ImagickDraw::setStrokeDashOffset', ), 'next' => array ( 0 => 'imagickdraw.setstrokelinejoin.php', 1 => 'ImagickDraw::setStrokeLineJoin', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagickdraw/setstrokelinecap.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL imagick 2, PECL imagick 3)
ImagickDraw::setStrokeLineCap — Specifies the shape to be used at the end of open subpaths when they are stroked
Questa funzione, al momento non è documentata; è disponibile soltanto la lista degli argomenti.
Specifies the shape to be used at the end of open subpaths when they are stroked.
Nessun valore viene restituito.
Example #1 ImagickDraw::setStrokeLineCap() example
<?php
function setStrokeLineCap($strokeColor, $fillColor, $backgroundColor) {
$draw = new \ImagickDraw();
$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);
$draw->setStrokeWidth(25);
$lineTypes = [\Imagick::LINECAP_BUTT, \Imagick::LINECAP_ROUND, \Imagick::LINECAP_SQUARE,];
$offset = 0;
foreach ($lineTypes as $lineType) {
$draw->setStrokeLineCap($lineType);
$draw->line(50 + $offset, 50, 50 + $offset, 250);
$offset += 50;
}
$imagick = new \Imagick();
$imagick->newImage(300, 300, $backgroundColor);
$imagick->setImageFormat("png");
$imagick->drawImage($draw);
header("Content-Type: image/png");
echo $imagick->getImageBlob();
}
?>