xref: /php-src/ext/gd/tests/bug52070.phpt (revision 0b8466f2)
1--TEST--
2Bug #52070 (imagedashedline() - dashed line sometimes is not visible)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if (!(imagetypes() & IMG_PNG)) {
8    die("skip No PNG support");
9}
10?>
11--FILE--
12<?php
13$im = imagecreate(1200, 800);
14$background_color = imagecolorallocate($im, 40, 40, 40);
15$color = imagecolorallocate($im, 255, 255, 255);
16imagedashedline($im, 800, 400, 300, 400, $color);
17imagedashedline($im, 800, 400, 300, 800, $color);
18imagedashedline($im, 800, 400, 400, 800, $color);
19imagedashedline($im, 800, 400, 500, 800, $color);
20imagedashedline($im, 800, 400, 600, 800, $color);
21imagedashedline($im, 800, 400, 700, 800, $color);
22imagedashedline($im, 800, 400, 800, 800, $color);
23include_once __DIR__ . '/func.inc';
24test_image_equals_file(__DIR__ . '/bug52070.png', $im);
25?>
26--EXPECT--
27The images are equal.
28