ID:               27756
 Updated by:       [EMAIL PROTECTED]
 Reported By:      info at silisoftware dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: Windows XP Pro
 PHP Version:      4.3.5
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

That is the nature of the arc drawing algorithm inside the 

GD library. 


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

[2004-03-29 10:44:20] info at silisoftware dot com

Description:
------------
Drawing an arc with an image thickness of other than 1 produces very
strange results. The thicker the line specified, the "hairier" it gets.
At 5px it's uneven, 25px quite ragged, at 50px and above it gets very
non-round. The best way I can show the problem is with some sample
images:

http://www.silisoftware.com/temp/imagearc/



Not sure if it's a related issue, but I notice if I use the same code
to draw an arc from 1-360 degrees, it looks like a big hairy "+"
instead of a "o", but if I draw from 0-360 degrees it becomes a 1px
circle, no matter what I specify for ImageSetThickness.

Reproduce code:
---------------
$imagethickness = 100;



$gdimg_output = ImageCreateTrueColor(400, 400);

$color_bg = ImageColorAllocate($gdimg_output,   0, 0, 255);

$color_fg = ImageColorAllocate($gdimg_output, 255, 0,   0);

ImageSetThickness($gdimg_output, $imagethickness);

ImageFilledRectangle($gdimg_output, 0, 0, 400, 400, $color_bg);

ImageArc($gdimg_output, 200, 200, 200, 200, 90, 360, $color_fg);

ImagePNG($gdimg_output);



Expected result:
----------------
100px thick, 270-degree red arc on blue background

Actual result:
--------------
This: http://www.silisoftware.com/temp/imagearc/100.png



270-degree red arc on blue background, but thickness varies from 1px to
100px, it looks "hairy", with a tendency to elongate into a "+" rather
than a "o" (more pronounced the thicker the line is set to).


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


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

Reply via email to