xref: /PHP-8.2/ext/gd/tests/libgd00106.phpt (revision a375d547)
1--TEST--
2libgd #106 (imagerectangle 1x1 draws 1x3)
3--EXTENSIONS--
4gd
5--FILE--
6<?php
7$im = imagecreatetruecolor(10,10);
8imagerectangle($im, 1,1, 1,1, 0xFFFFFF);
9$c1 = imagecolorat($im, 1,1);
10$c2 = imagecolorat($im, 1,2);
11$c3 = imagecolorat($im, 2,1);
12$c4 = imagecolorat($im, 2,2);
13if ($c1 == 0xFFFFFF && $c2 == 0 && $c3 == 0 && $c4 == 0) {
14    echo "Ok";
15} else {
16    echo "failed";
17}
18?>
19--EXPECT--
20Ok
21