From: agarcia at at4 dot net
Operating system: linux
PHP version: 4.3.6RC3
PHP Bug Type: GD related
Bug description: imagefilltoborder fails to fill a polygon
Description:
------------
imagefilltoborder stops filling a polygon before reaching
all the borders.
The code provided works as expected with php 4.3.4.
Not tested with 4.3.5
Reproduce code:
---------------
header("Content-type: image/png");
$id = @imagecreate(200, 200);
$background_color = imagecolorallocate($id, 0, 0, 0);
$color = imagecolorallocate($id, 255, 0, 0);
$contorno = imagecolorallocate($id, 0, 255, 0);
$puntos =
array(135,22,138,22,138,29,158,29,158,49,136,49,136,41,132,41,132,33,135,33,135,22);
imagepolygon($id, &$puntos, floor(count($puntos)/2), $contorno);
imagefilltoborder($id, 145, 35, $contorno, $color);
ImagePng( $id );
ImageDestroy( $id );
Expected result:
----------------
A red filled green polygon
Actual result:
--------------
A partially red filled green polygon
--
Edit bug report at http://bugs.php.net/?id=27995&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27995&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27995&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27995&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27995&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27995&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27995&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27995&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27995&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27995&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27995&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27995&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27995&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27995&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27995&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27995&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27995&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27995&r=float