1--TEST--
2Test Imagick, annotateImage
3--SKIPIF--
4<?php
5$imageMagickRequiredVersion=0x675;
6require_once(dirname(__FILE__) . '/skipif.inc');
7?>
8--FILE--
9<?php
10
11require_once(dirname(__FILE__) . '/functions.inc');
12
13$strokeColor = 'rgb(0, 0, 0)';
14$fillColor = 'rgb(232, 227, 232)';
15
16function annotateImage($strokeColor, $fillColor) {
17    $imagick = new \Imagick();
18    $imagick->newPseudoImage(640, 480, "magick:logo");
19
20    $draw = new \ImagickDraw();
21    $draw->setStrokeColor($strokeColor);
22    $draw->setFillColor($fillColor);
23
24    $draw->setStrokeWidth(1);
25    $draw->setFontSize(36);
26
27    $text = "Imagick is a native php \nextension to create and \nmodify images using the\nImageMagick API.";
28
29    setFontForImagick($imagick);
30    setFontForImagickDraw($draw);
31    $imagick->annotateimage($draw, 40, 40, 0, $text);
32
33    $bytes = $imagick->getImageBlob();
34    if (strlen($bytes) <= 0) { echo "Failed to generate image.";}
35}
36
37annotateImage($strokeColor, $fillColor) ;
38echo "Ok";
39?>
40--EXPECTF--
41Ok