1--TEST--
2Test ImagickDraw, matte
3--SKIPIF--
4<?php
5require_once(dirname(__FILE__) . '/skipif.inc');
6checkClassMethods('ImagickDraw', array('matte'));
7?>
8
9--FILE--
10<?php
11
12$paintType = 4;
13$backgroundColor = 'rgb(225, 225, 225)';
14$strokeColor = 'rgb(0, 0, 0)';
15$fillColor = 'DodgerBlue2';
16
17function matte($strokeColor, $fillColor, $backgroundColor, $paintType) {
18    $draw = new \ImagickDraw();
19
20    $draw->setStrokeColor($strokeColor);
21    $draw->setFillColor($fillColor);
22
23    $draw->setStrokeWidth(2);
24    $draw->setFontSize(72);
25
26    $draw->matte(120, 120, $paintType);
27
28    $draw->rectangle(100, 100, 300, 200);
29
30
31    $imagick = new \Imagick();
32    $imagick->newImage(500, 500, $backgroundColor);
33    $imagick->setImageFormat("png");
34    $imagick->drawImage($draw);
35
36    $bytes = $imagick->getImageBlob();
37    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
38}
39
40matte($strokeColor, $fillColor, $backgroundColor, $paintType) ;
41echo "Ok";
42?>
43--EXPECTF--
44Deprecated: %s ImagickDraw::matte() is deprecated in %s
45Ok
46