1--TEST-- 2Test ImagickDraw, skewY 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$startX = 50; 13$startY = 50; 14$endX = 400; 15$endY = 400; 16$skew = 10; 17 18function skewY($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor, 19 $startX, $startY, $endX, $endY, $skew) { 20 21 $draw = new \ImagickDraw(); 22 23 $draw->setStrokeColor($strokeColor); 24 $draw->setStrokeWidth(2); 25 $draw->setFillColor($fillColor); 26 $draw->rectangle($startX, $startY, $endX, $endY); 27 $draw->setFillColor($fillModifiedColor); 28 $draw->skewY($skew); 29 $draw->rectangle($startX, $startY, $endX, $endY); 30 31 $image = new \Imagick(); 32 $image->newImage(500, 500, $backgroundColor); 33 $image->setImageFormat("png"); 34 $image->drawImage($draw); 35 36 $bytes = $image->getImageBlob(); 37 if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 38} 39 40skewY($strokeColor, $fillColor, $backgroundColor, $fillModifiedColor, 41 $startX, $startY, $endX, $endY, $skew); 42echo "Ok"; 43?> 44--EXPECTF-- 45Ok