imagefilledarc_variation1.phpt 758 B

123456789101112131415161718192021222324252627
  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. --SKIPIF--
  7. <?php
  8. if (!extension_loaded("gd")) die("skip GD not present");
  9. if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
  10. die("skip test requires GD 2.2.2 or higher");
  11. }
  12. ?>
  13. --FILE--
  14. <?php
  15. $image = imagecreatetruecolor(100, 100);
  16. $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
  17. //create an arc and fill it with white color
  18. imagefilledarc($image, 50, 50, 30, 30, 0, -25, $white, IMG_ARC_PIE);
  19. include_once __DIR__ . '/func.inc';
  20. test_image_equals_file(__DIR__ . '/imagefilledarc_variation1.png', $image);
  21. ?>
  22. --EXPECT--
  23. The images are equal.