function createPolygon()
{

// 建立多边形各顶点坐标的数组
$values = array(
            40,  50,  // Point 1 (x, y)
            80,  100,  // Point 2 (x, y)
            260, 100,  // Point 3 (x, y)
            300, 50,  // Point 4 (x, y)             
            );

// 创建图像
$image = imagecreatetruecolor(550, 450);
// 设定颜色
$bg   = imagecolorallocate($image, 100, 100, 300);
$blue = imagecolorallocate($image, 0, 0, 255);

// 画一个多边形
imagefilledpolygon($image, $values, 4, $blue);

imagefilledrectangle($image, 0, 0, 200, 200, IMG_COLOR_TILED);
return $image;

这个函数是实现一个梯形的绘图,我想在这个梯形里面用一张图片重复地填充一张图片、请问怎么实现呢。手册上的是填充颜色,但填充图片的却没有、求助