1--TEST--
2Test ImagickDraw, point
3--SKIPIF--
4<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5--FILE--
6<?php
7
8$backgroundColor = 'rgb(225, 225, 225)';
9$strokeColor = 'rgb(0, 0, 0)';
10$fillColor = 'DodgerBlue2';
11
12function point($fillColor, $backgroundColor) {
13
14    $draw = new \ImagickDraw();
15
16    $draw->setFillColor($fillColor);
17
18    for ($x = 0; $x < 10000; $x++) {
19        $draw->point(rand(0, 500), rand(0, 500));
20    }
21
22    $imagick = new \Imagick();
23    $imagick->newImage(500, 500, $backgroundColor);
24    $imagick->setImageFormat("png");
25    $imagick->drawImage($draw);
26
27    $bytes = $imagick->getImageBlob();
28    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
29}
30
31point($fillColor, $backgroundColor) ;
32echo "Ok";
33?>
34--EXPECTF--
35Ok