xref: /PHP-7.3/ext/gd/tests/bug52070.phpt (revision 85290bbf)
1--TEST--
2Bug #52070 (imagedashedline() - dashed line sometimes is not visible)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6?>
7--FILE--
8<?php
9$im = imagecreate(1200, 800);
10$background_color = imagecolorallocate($im, 40, 40, 40);
11$color = imagecolorallocate($im, 255, 255, 255);
12imagedashedline($im, 800, 400, 300, 400, $color);
13imagedashedline($im, 800, 400, 300, 800, $color);
14imagedashedline($im, 800, 400, 400, 800, $color);
15imagedashedline($im, 800, 400, 500, 800, $color);
16imagedashedline($im, 800, 400, 600, 800, $color);
17imagedashedline($im, 800, 400, 700, 800, $color);
18imagedashedline($im, 800, 400, 800, 800, $color);
19include_once __DIR__ . '/func.inc';
20test_image_equals_file(__DIR__ . '/bug52070.png', $im);
21?>
22===DONE===
23--EXPECT--
24The images are equal.
25===DONE===
26