PHP 8.5.0 Alpha 2 available for testing

ImagickDraw::matte

(PECL imagick 2, PECL imagick 3)

ImagickDraw::matteDibuja sobre el canal de opacidad de la imagen

Descripción

public ImagickDraw::matte(float $x, float $y, int $paint): bool
Advertencia

Esta función está actualmente no documentada; solo la lista de sus argumentos está disponible.

Dibuja sobre el canal de opacidad de la imagen, con el fin de hacer transparentes los píxeles indicados.

Parámetros

x

Abscisa del mate

y

Ordenada del mate

paint

Una de las constantes PAINT (imagick::PAINT_*).

Valores devueltos

Esta función retorna true en caso de éxito o false si ocurre un error.

Ejemplos

Ejemplo #1 Ejemplo con ImagickDraw::matte()

<?php
function matte($strokeColor, $fillColor, $backgroundColor, $paintType) {
$draw = new \ImagickDraw();

$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);

$draw->setStrokeWidth(2);
$draw->setFontSize(72);

$draw->matte(120, 120, $paintType);
$draw->rectangle(100, 100, 300, 200);

$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