php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41940 imageline() STILL doesn't work perfectly with imagesetthickness()
Submitted: 2007-07-09 14:44 UTC Modified: 2008-03-04 03:54 UTC
Votes:3
Avg. Score:4.3 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:0 (0.0%)
From: paul dot yarkov at gmail dot com Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 5.2.3 OS: Windows 2000 SP4
Private report: No CVE-ID: None
 [2007-07-09 14:44 UTC] paul dot yarkov at gmail dot com
Description:
------------
imageline() STILL doesn't honor imagesetthickness() settings.

Note: It's not a bug #40764! It's ANOTHER bug and ANOTHER OS used! 




Reproduce code:
---------------
<?php
$image=imagecreatetruecolor(400, 400);
$white = imagecolorallocate($image, 255, 255, 255);
$black = imagecolorallocate($image, 0, 0, 0);
imagefill($image, 0, 0, $white);
imagesetthickness($image, 10);

imageline($image, 200, 0, 200, 400, $black);
imageline($image, 0, 200, 400, 200, $black);
imageline($image, 0, 0, 400, 400, $black);
imageline($image, 0, 400, 400, 0, $black);

header("Content-type: image/png");
header("Cache-Control: no-cache;");
imagepng($image);

imagedestroy($image);
?>


Expected result:
----------------
This should draw four lines, all 10 pixels thick.



Actual result:
--------------
Only the vertical and horizonal lines is the correct thickness.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-09 14:51 UTC] pajoye@php.net
"imageline() STILL doesn't honor imagesetthickness() settings."

There is no need to be loud or to write UPPERCASE. I can read normal texts :)

"Note: It's not a bug #40764! It's ANOTHER bug and ANOTHER OS used!"

OS has nothing to do with that.

Interesting that nobody noticed (incl. me) before. But the thickness was only half of what it should be since ages. I'm adding it as a test to solve this problem once and for all.
 [2007-07-09 17:19 UTC] paul dot yarkov at gmail dot com
There is no need to be loud or to write UPPERCASE. I can read normal
texts :)

Sorry for UPPERCASE, I was tired a lot of warnings about this bug is probably fixed. :)

Interesting that nobody noticed (incl. me) before. But the thickness was only half of what it should be since ages. I'm adding it as a test to solve this problem once and for all.

This bug is noticeable only when angles between lines are divisible 45 degrees.
 [2008-03-04 03:53 UTC] pajoye@php.net
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.


 [2008-03-04 03:54 UTC] pajoye@php.net
fixed > closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 07:01:29 2024 UTC