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