xref: /php-src/ext/gd/tests/bug40764.phpt (revision a375d547)
1--TEST--
2Bug #40764 (line thickness not respected for horizontal and vertical lines)
3--EXTENSIONS--
4gd
5--FILE--
6<?php
7$image=imagecreatetruecolor(400, 400);
8$white = imagecolorallocate($image, 255, 255, 255);
9$black = imagecolorallocate($image, 0, 0, 0);
10$red = imagecolorallocate($image, 255, 0, 0);
11
12imagefill($image, 0, 0, $white);
13imagesetthickness($image, 10);
14
15imageline($image, 200, 0, 200, 400, $black);
16imageline($image, 0, 200, 400, 200, $black);
17imageline($image, 0, 0, 392, 392, $black);
18
19imagesetthickness($image, 1);
20
21imageline($image, 200, 0, 200, 400, $red);
22imageline($image, 0, 200, 400, 200, $red);
23imageline($image, 0, 0, 392, 392, $red);
24print_r(imagecolorat($image, 195, 0));
25print_r(imagecolorat($image, 0, 195));
26
27?>
28--EXPECT--
2900
30