ID:               28761
 User updated by:  odarcan at hotmail dot com
 Reported By:      odarcan at hotmail dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: win xp
 PHP Version:      Irrelevant
 New Comment:

clarification:
the uglyness appears in the junctions of different lines when the first
one's ending coords. is the second one's beginning coords., the drawn
lines should be more seamless


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

[2004-06-13 06:13:25] odarcan at hotmail dot com

Description:
------------
i dont think this is a bug, it may be, and i dont know if reporting
this here will do any good,

when drawing lines in gd, other than 90degree angles; the endings of
the lines always become horisontal

and it looks really, REALLY cheap! it doesnt show when the lines are 1
pixel wide but when drawing thicker lines, it becomes VERY obvious,
this is my greatest obstacle in my project right now, ive emailed
boutell.com but got no answer.

thanks,
Osman Darcan

Reproduce code:
---------------
<?
$im = imagecreate(400, 400) or die ("Cannot Initialize new GD image
stream");
header ("Content-type: image/png");

$grey = imagecolorallocate ($im, 155, 155, 155);
$blue = imagecolorallocate ($im, 0, 0, 255);
$green = imagecolorallocate ($im, 0, 155, 0);

imagesetthickness($im,9);

imageline($im,5,5,50,50,$blue);
imageline($im,50,50,100,300,$blue);
imageline($im,100,300,300,40,$blue);

imageline($im,5+20,5+20,50+20,50+20,$green);
imageline($im,50+20,50+20,60+20,300+20,$green);
imageline($im,100+20,300+20,300+20,40+20,$green);

imagepng($im,"",60);
?>

Expected result:
----------------
try different values for imagesetthickness

Actual result:
--------------
you'll see that some lines look very weird..  im not sure its a bug but
it's sure ugly allright..

php and gd deserves something as simple as a decent option to set
thickness to lines.. shouldnt be so hard to implement?


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


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

Reply via email to