php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34726 Problem with imagedashedline
Submitted: 2005-10-04 12:35 UTC Modified: 2005-10-04 12:43 UTC
From: thomas dot jungbauer at eunet dot co dot at Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.0.5 OS: Whitebox 3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thomas dot jungbauer at eunet dot co dot at
New email:
PHP Version: OS:

 

 [2005-10-04 12:35 UTC] thomas dot jungbauer at eunet dot co dot at
Description:
------------
Hi,

I am trying to draw 4 dashed lines between some pictures. 

The following attributes I am using (calculating) (pls see source code below)

371+22, 20+55, 425+(425/2), 300, 1
434+22, 20+55, 425+(425/2), 300, 1
308+22, 20+55, 425+(425/2), 300, 1
497+22, 20+55, 425+(425/2), 300, 1



Reproduce code:
---------------
$bgImg = imageCreate(850, 400);
ImageColorAllocate ($bgImg, 55, 77, 134);

$logo_server = "./images/logo_server.png";
imageCopyMerge($bgImg, $dist_server, $start_pic, 75, 0, 0, 43, 55, 100);
[...]
// merging all pictrues (of the servers) in $bmImg

imagedashedline($bgImg, 393, 75, 425+(425/2), 300, 1);
imagedashedline($bgImg, 456, 75, 425+(425/2), 300, 1);
imagedashedline($bgImg, 330, 75, 425+(425/2), 300, 1);
imagedashedline($bgImg, 519, 75, 425+(425/2), 300, 1);

Expected result:
----------------
However only 2 lines are drawn. When I try imageline (instead of imagedashedline), I get all 4 lines.

I am not quite sure why this happens. Perhaps because the x2-coord is a decimal ...???

any ideas?

kind regards
thomas


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-04 12:39 UTC] sniper@php.net
The function expects integers to be passed.
 [2005-10-04 12:43 UTC] thomas dot jungbauer at eunet dot co dot at
already tried this....
same effect with:

imagedashedline($bgImg, 393, 75, 638, 300, 1);
imagedashedline($bgImg, 456, 75, 638, 300, 1);
imagedashedline($bgImg, 330, 75, 638, 300, 1);
imagedashedline($bgImg, 519, 75, 638, 300, 1);
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC