1--TEST-- 2Test ImagickDraw, setStrokeAntialias 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 setStrokeAntialias($strokeColor, $fillColor, $backgroundColor) { 13 14 $draw = new \ImagickDraw(); 15 16 $draw->setStrokeColor($strokeColor); 17 $draw->setFillColor($fillColor); 18 $draw->setStrokeWidth(1); 19 $draw->setStrokeAntialias(false); 20 $draw->line(100, 100, 400, 105); 21 22 $draw->line(100, 140, 400, 185); 23 24 $draw->setStrokeAntialias(true); 25 $draw->line(100, 110, 400, 115); 26 $draw->line(100, 150, 400, 195); 27 28 $image = new \Imagick(); 29 $image->newImage(500, 250, $backgroundColor); 30 $image->setImageFormat("png"); 31 32 $image->drawImage($draw); 33 34 $bytes = $image->getImageBlob(); 35 if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 36} 37 38setStrokeAntialias($strokeColor, $fillColor, $backgroundColor) ; 39echo "Ok"; 40?> 41--EXPECTF-- 42Ok