bug73614.phpt 798 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Bug #73614 (gdImageFilledArc() doesn't properly draw pies)
  3. --EXTENSIONS--
  4. gd
  5. --SKIPIF--
  6. <?php
  7. if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream bugfix not yet released');
  8. ?>
  9. --FILE--
  10. <?php
  11. require_once __DIR__ . '/func.inc';
  12. $image = imagecreatetruecolor(500, 500);
  13. $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
  14. $navy = imagecolorallocate($image, 0x00, 0x00, 0x80);
  15. $red = imagecolorallocate($image, 0xFF, 0x00, 0x00);
  16. imagefilledarc($image, 250, 250, 500, 250, 0, 88, $white, IMG_ARC_PIE);
  17. imagefilledarc($image, 250, 250, 500, 250, 88, 91 , $navy, IMG_ARC_PIE);
  18. imagefilledarc($image, 250, 250, 500, 250, 91, 360 , $red, IMG_ARC_PIE);
  19. test_image_equals_file(__DIR__ . '/bug73614.png', $image);
  20. ?>
  21. --EXPECT--
  22. The images are equal.