1--TEST--
2Test imagesetbrush() function : basic functionality
3--CREDITS--
4Erick Belluci Tedeschi <erickbt86 [at] gmail [dot] com>
5#testfest PHPSP on 2009-06-20
6--EXTENSIONS--
7gd
8--FILE--
9<?php
10// Create the brush image
11$img = imagecreate(10, 10);
12
13// Create the main image, 100x100
14$mainimg = imagecreatetruecolor(100, 100);
15
16$white = imagecolorallocate($img, 255, 0, 0);
17imagefilledrectangle($img, 0, 0, 299, 99, $white);
18
19// Set the brush
20imagesetbrush($mainimg, $img);
21
22// Draw a couple of brushes, each overlaying each
23imageline($mainimg, 50, 50, 50, 60, IMG_COLOR_BRUSHED);
24
25include_once __DIR__ . '/func.inc';
26test_image_equals_file(__DIR__ . '/imagesetbrush_basic.png', $mainimg);
27?>
28--EXPECT--
29The images are equal.
30