imagefilledarc_variation1.phpt 717 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Testing passing negative end angle to imagefilledarc() of GD library
  3. --CREDITS--
  4. Edgar Ferreira da Silva <contato [at] edgarfs [dot] com [dot] br>
  5. #testfest PHPSP on 2009-06-20
  6. --EXTENSIONS--
  7. gd
  8. --SKIPIF--
  9. <?php
  10. if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
  11. die("skip test requires GD 2.2.2 or higher");
  12. }
  13. ?>
  14. --FILE--
  15. <?php
  16. $image = imagecreatetruecolor(100, 100);
  17. $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
  18. //create an arc and fill it with white color
  19. imagefilledarc($image, 50, 50, 30, 30, 0, -25, $white, IMG_ARC_PIE);
  20. include_once __DIR__ . '/func.inc';
  21. test_image_equals_file(__DIR__ . '/imagefilledarc_variation1.png', $image);
  22. ?>
  23. --EXPECT--
  24. The images are equal.