ID:               27385
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nih at phlux dot co dot uk
-Status:           Verified
+Status:           Wont fix
 Bug Type:         GD related
 Operating System: *
 PHP Version:      4CVS, 5CVS (2004-02-24)
 New Comment:

hello,



This is a known problem of the gd arcs functions. It's due to the
ellipse approximation which is based on the radius angle and not  on
the x/y positions. That means that the filled lines can be drawn many
times. A complete rewrite of this funciton is required, something like
what is done in imagefilledellipse.



pierre


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

[2004-02-24 18:30:17] nih at phlux dot co dot uk

I used the bundled GD library.

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

[2004-02-24 18:14:25] [EMAIL PROTECTED]

Did you use the bundled GD library or the external one. (In short: what
is your configure line?)

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

[2004-02-24 17:51:49] nih at phlux dot co dot uk

Description:
------------
The elliptical drawing tools in the GD library that offer a fill
function do not correctly render the fill when using a translucent
colour. It would appear that the fill is drawn by a series of lines
from the centre point to each pixel around the edge of the ellipse or
arc, thus pixels near the centre are drawn over many times, thus
increasing the effective alpha of those pixels.

Reproduce code:
---------------
<?php



$img = imagecreatetruecolor(100, 100);

imageantialias($img, FALSE);

$blue = imagecolorallocatealpha($img, 0, 0, 255, 50);



imagefilledarc($img, 5, 5, 170, 170, 0, 85, $blue, 4);



header("Content-type: image/png");

imagepng($img);

imagedestroy($img);



?>

Expected result:
----------------
There should be a PNG image output of an arc of a 170px diameter going
from a bearing of 090 to a bearing of 175 in 50% transparent pure RGB
blue (0, 0, 255).

Actual result:
--------------
The transparency isn't correct, the closer towards the centre of the
arc the pixel is, the lower it's transparency (I'm almost certain it's
because they are being redrawn over and over).


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


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

Reply via email to