forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbug40764.phpt
31 lines (26 loc) · 831 Bytes
/
bug40764.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Bug #40764 (line thickness not respected for horizontal and vertical lines)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
$image=imagecreatetruecolor(400, 400);
$white = imagecolorallocate($image, 255, 255, 255);
$black = imagecolorallocate($image, 0, 0, 0);
$red = imagecolorallocate($image, 255, 0, 0);
imagefill($image, 0, 0, $white);
imagesetthickness($image, 10);
imageline($image, 200, 0, 200, 400, $black);
imageline($image, 0, 200, 400, 200, $black);
imageline($image, 0, 0, 392, 392, $black);
imagesetthickness($image, 1);
imageline($image, 200, 0, 200, 400, $red);
imageline($image, 0, 200, 400, 200, $red);
imageline($image, 0, 0, 392, 392, $red);
print_r(imagecolorat($image, 195, 0));
print_r(imagecolorat($image, 0, 195));
?>
--EXPECT--
00