ID:               44847
 User updated by:  simslim at gmail dot com
 Reported By:      simslim at gmail dot com
 Status:           Bogus
 Bug Type:         GD related
 Operating System: Win XP
 PHP Version:      5.2.5
 Assigned To:      pajoye
 New Comment:

I'm sorry, I didn't understand that the filling goes too all directions
untill it hits a border.
I hope the manual page about this function can be changed because I
think it's unclear for other people too.
Thanks for the quick reply!


Previous Comments:
------------------------------------------------------------------------

[2008-04-27 17:02:44] [EMAIL PROTECTED]

imagefill _fills_ the image until an edge has been met, what you are
trying to do should be done using imagefilledrectangle.

------------------------------------------------------------------------

[2008-04-27 16:55:21] simslim at gmail dot com

Description:
------------
I use imagefill to fill a picture, but no matter what I enter as start
x and y, it always fills the whole image (with x and y higher then 0 and
not higher then image sizes)

Reproduce code:
---------------
header("Content-Type: image/png");
$img    = imagecreatetruecolor(100,100);
$red    = imagecolorallocate($img,255,0,0);
$green  = imagecolorallocate($img,0,255,0);
imagefill($img,0,0,$red);
imagefill($img,50,0,$green);
imagepng($img);

Expected result:
----------------
A picture, 100 x 100, with the left half red and the right half green

Actual result:
--------------
A picture, 100 x 100, completely green


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44847&edit=1

Reply via email to