array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'imagickdraw.setfillcolor.php', 1 => 'ImagickDraw::setFillColor', 2 => 'Sets the fill color to be used for drawing filled objects', ), 'up' => array ( 0 => 'class.imagickdraw.php', 1 => 'ImagickDraw', ), 'prev' => array ( 0 => 'imagickdraw.setfillalpha.php', 1 => 'ImagickDraw::setFillAlpha', ), 'next' => array ( 0 => 'imagickdraw.setfillopacity.php', 1 => 'ImagickDraw::setFillOpacity', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagickdraw/setfillcolor.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

ImagickDraw::setFillColor

(PECL imagick 2, PECL imagick 3)

ImagickDraw::setFillColorSets the fill color to be used for drawing filled objects

Descrizione

public ImagickDraw::setFillColor(ImagickPixel|string $fill_color): bool
Avviso

Questa funzione, al momento non è documentata; è disponibile soltanto la lista degli argomenti.

Sets the fill color to be used for drawing filled objects.

Elenco dei parametri

fill_color

ImagickPixel to use to set the color

Valori restituiti

Nessun valore viene restituito.

Esempi

Example #1 ImagickDraw::setFillColor()

<?php
function setFillColor($strokeColor, $fillColor, $backgroundColor) {

$draw = new \ImagickDraw();

$draw->setStrokeOpacity(1);
$draw->setStrokeWidth(1.5);
$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);
$draw->rectangle(50, 50, 150, 150);

$draw->setFillColor("rgb(200, 32, 32)");
$draw->rectangle(200, 50, 300, 150);

$image = new \Imagick();
$image->newImage(500, 500, $backgroundColor);
$image->setImageFormat("png");

$image->drawImage($draw);

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

?>