1--TEST--
2Test ImagickPixel, setColor
3--SKIPIF--
4<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5--FILE--
6<?php
7
8
9function setColor() {
10    $draw = new \ImagickDraw();
11
12    $strokeColor = new \ImagickPixel('green');
13    $fillColor = new \ImagickPixel();
14    $fillColor->setColor('rgba(100%, 75%, 0%, 1.0)');
15
16    $draw->setstrokewidth(3.0);
17    $draw->setStrokeColor($strokeColor);
18    $draw->setFillColor($fillColor);
19    $draw->rectangle(200, 200, 300, 300);
20
21    $image = new \Imagick();
22    $image->newImage(500, 500, "SteelBlue2");
23    $image->setImageFormat("png");
24
25    $image->drawImage($draw);
26
27    $bytes = $image->getImageBlob();
28    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
29}
30
31setColor() ;
32echo "Ok";
33?>
34--EXPECTF--
35Ok