1--TEST--
2Test ImagickDraw, getDensity
3--SKIPIF--
4<?php
5require_once(dirname(__FILE__) . '/skipif.inc');
6checkClassMethods('ImagickDraw', array('getDensity', 'setDensity'));
7?>
8--XFAIL--
9Expected behaviour is not known :-p
10--FILE--
11<?php
12
13$backgroundColor = 'rgb(225, 225, 225)';
14$strokeColor = 'rgb(0, 0, 0)';
15$fillColor = 'DodgerBlue2';
16
17$draw = new \ImagickDraw();
18
19$draw->setStrokeColor($strokeColor);
20$draw->setFillColor($fillColor);
21
22$draw->setStrokeWidth(2);
23$draw->setFontSize(72);
24
25$opacityToSet = 0.1;
26
27$densitySet = "200";
28
29
30$draw->setDensity($densitySet);
31$densityGet = $draw->getDensity();
32
33if (strcmp($densitySet, $densityGet) !== 0) {
34	echo "Density retrieved [$densityGet] is not the value set [$densitySet].";
35}
36
37$draw->line(125, 70, 100, 50);
38$draw->line(350, 170, 100, 150);
39
40$imagick = new \Imagick();
41$imagick->newImage(500, 500, $backgroundColor);
42$imagick->setImageFormat("png");
43$imagick->drawImage($draw);
44
45$bytes = $imagick->getImageBlob();
46if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
47
48echo "Ok";
49
50?>
51--EXPECTF--
52Ok