Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<imageellipseimagefilledarc>
Last updated: Tue, 19 Sep 2006

imagefill

(PHP 3, PHP 4, PHP 5)

imagefill -- Flood fill

Description

bool imagefill ( resource image, int x, int y, int color )

imagefill() performs a flood fill starting at coordinate x, y (top left is 0, 0) with color color in the image image.

Example 1. imagefill() example

<?php

$im = imagecreatetruecolor(100, 100);

// sets background to red
$red = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 0, 0, $red);

header('Content-type: image/png'); 
imagepng($im);
imagedestroy($im);
?>

See also imagecolorallocate().




<imageellipseimagefilledarc>
Last updated: Tue, 19 Sep 2006