1--TEST--
2Test ImagickDraw, scale
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$fillModifiedColor = 'LightCoral';
12
13function scale($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) {
14
15    $draw = new \ImagickDraw();
16    $draw->setStrokeColor($strokeColor);
17    $draw->setStrokeWidth(4);
18    $draw->setFillColor($fillColor);
19    $draw->rectangle(200, 200, 300, 300);
20    $draw->setFillColor($fillModifiedColor);
21    $draw->scale(1.4, 1.4);
22    $draw->rectangle(200, 200, 300, 300);
23
24    $image = new \Imagick();
25    $image->newImage(500, 500, $backgroundColor);
26    $image->setImageFormat("png");
27    $image->drawImage($draw);
28
29    $bytes = $image->getImageBlob();
30    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
31}
32
33scale($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor) ;
34echo "Ok";
35?>
36--EXPECTF--
37Ok