bug52070.phpt 726 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #52070 (imagedashedline() - dashed line sometimes is not visible)
  3. --EXTENSIONS--
  4. gd
  5. --FILE--
  6. <?php
  7. $im = imagecreate(1200, 800);
  8. $background_color = imagecolorallocate($im, 40, 40, 40);
  9. $color = imagecolorallocate($im, 255, 255, 255);
  10. imagedashedline($im, 800, 400, 300, 400, $color);
  11. imagedashedline($im, 800, 400, 300, 800, $color);
  12. imagedashedline($im, 800, 400, 400, 800, $color);
  13. imagedashedline($im, 800, 400, 500, 800, $color);
  14. imagedashedline($im, 800, 400, 600, 800, $color);
  15. imagedashedline($im, 800, 400, 700, 800, $color);
  16. imagedashedline($im, 800, 400, 800, 800, $color);
  17. include_once __DIR__ . '/func.inc';
  18. test_image_equals_file(__DIR__ . '/bug52070.png', $im);
  19. ?>
  20. --EXPECT--
  21. The images are equal.