ID:               28506
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tony2001 at phpclub dot net
-Status:           Open
+Status:           Closed
 Bug Type:         GD related
 Operating System: Linux 2.4.23
 PHP Version:      5CVS-2004-05-24 (dev)
-Assigned To:      
+Assigned To:      pajoye
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

while (s < 0) s += 360 is used now.

--Pierre


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

[2004-05-24 14:49:15] tony2001 at phpclub dot net

Description:
------------
imagearc() draws broken arc, when using negative value as s parameter.
It could be GDlib bug, at least I found a couple of words in GD man:
http://www.boutell.com/gd/manual2.0.23.html about unspecified bugs in
gdImageArc().
Also, there can be simple workaround: just don't accept negative
values, reduce them to zero.

Reproduce code:
---------------
// result image is here: http://tony2001.phpclub.net/temp/imagearc.png
//
// create a 200*200 image
$img = imagecreate(200, 200);

// allocate some colors
$white = imagecolorallocate($img, 255, 255, 255);
$black = imagecolorallocate($img, 0, 50, 200);
   
// draw a white circle 
imagearc($img, 100, 100, 150, 150, -1, 200, $black);

// output image in the browser
header("Content-type: image/png");
imagepng($img);
   
// free memory
imagedestroy($img);


Expected result:
----------------
a flat arc

Actual result:
--------------
a broken arc with some crosslines


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


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

Reply via email to