xref: /PHP-7.3/ext/gd/tests/bug42434.phpt (revision b746e698)
1--TEST--
2Bug #42434 (ImageLine w/ antialias = 1px shorter)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) {
6	die('skip gd extension not available');
7}
8?>
9--FILE--
10<?php
11$im = imagecreatetruecolor(10, 2);
12imagefilledrectangle($im, 0, 0, 10, 2, 0xFFFFFF);
13
14imageantialias($im, true);
15imageline($im, 0, 0, 10, 0, 0x000000);
16
17if (imagecolorat($im, 9, 0) == 0x000000) {
18	echo 'DONE';
19} else {
20	echo 'Bugged';
21}
22
23imagedestroy($im);
24?>
25--EXPECT--
26DONE
27