array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), '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); ?>

ImagickDraw::setStrokeLineCap

(PECL imagick 2, PECL imagick 3)

ImagickDraw::setStrokeLineCapSpecifies the shape to be used at the end of open subpaths when they are stroked

Опис

public ImagickDraw::setStrokeLineCap(int $linecap): bool
Увага

Наразі ця функція не документована. Доступний лише список її параметрів.

Specifies the shape to be used at the end of open subpaths when they are stroked.

Параметри

linecap

One of the LINECAP constant (imagick::LINECAP_*).

Значення, що повертаються

Не повертає значень.

Приклади

Приклад #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();
}

?>