1--TEST--
2Testing imagefilltoborder() of GD library
3--CREDITS--
4Ivan Rosolen <contato [at] ivanrosolen [dot] com>
5#testfest PHPSP on 2009-06-30
6--EXTENSIONS--
7gd
8--SKIPIF--
9<?php
10if (!(imagetypes() & IMG_PNG)) {
11    die("skip No PNG support");
12}
13?>
14--FILE--
15<?php
16// Create a image
17$image = imagecreatetruecolor( 100, 100 );
18
19// Draw a rectangle
20imagefilledrectangle( $image, 0, 0, 100, 100, imagecolorallocate( $image, 255, 255, 255 ) );
21
22// Draw an ellipse to fill with a black border
23imageellipse( $image, 50, 50, 50, 50, imagecolorallocate( $image, 0, 0, 0 ) );
24
25// Fill border
26imagefilltoborder( $image, 50, 50, imagecolorallocate( $image, 0, 0, 0 ), imagecolorallocate( $image, 255, 0, 0 ) );
27
28include_once __DIR__ . '/func.inc';
29test_image_equals_file(__DIR__ . '/imagefilltoborder_basic.png', $image);
30
31?>
32--EXPECT--
33The images are equal.
34