Annotation of embedaddon/php/ext/gd/tests/libgd00191.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: libgd FS#191 (A circle becomes square)
        !             3: --SKIPIF--
        !             4: <?php
        !             5:        if (!extension_loaded('gd')) die("skip gd extension not available\n");
        !             6:        if (!GD_BUNDLED) die("skip requires bundled GD library\n");
        !             7: ?>
        !             8: --FILE--
        !             9: <?php
        !            10: $im = imagecreatetruecolor(100, 100);
        !            11: imagefilledrectangle($im, 0, 0, 100, 100, imagecolorallocate($im, 255, 255, 255));
        !            12: imagesetthickness($im, 20);
        !            13: imagefilledellipse($im, 30, 50, 20, 20, imagecolorallocate($im, 0, 0, 0));
        !            14: $index = imagecolorat($im, 12, 28);
        !            15: $arr = imagecolorsforindex($im, $index);
        !            16: if ($arr['red'] == 255 && $arr['green'] == 255 && $arr['blue'] == 255) {
        !            17:        echo "Ok";
        !            18: } else {
        !            19:        echo "failed";
        !            20: }
        !            21: ?>
        !            22: --EXPECT--
        !            23: Ok

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>