search for in the  
<imagecreatetruecolorimagedestroy>
Last updated: Thu, 19 May 2005

imagedashedline

(PHP 3, PHP 4, PHP 5)

imagedashedline -- Draw a dashed line

Description

int imagedashedline ( resource image, int x1, int y1, int x2, int y2, int color )

This function is deprecated. Use combination of imagesetstyle() and imageline() instead.



User Contributed Notes
imagedashedline
michi at marel dot at
19-Nov-2003 08:49
There's a bug till PHP 4.0.4 in this function. You can only draw vertical dashed lines. To draw other dashed lines you can set <ImageSetStyle> to a special dashed line and draw it by <ImageLine>.

Sample code:
<?php
function MDashedLine($image, $x0, $y0, $x1, $y1, $fg, $bg)
{
      
$st = array($fg, $fg, $fg, $fg, $bg, $bg, $bg, $bg);
      
ImageSetStyle($image, $st);
      
ImageLine($image, $x0, $y0, $x1, $y1, IMG_COLOR_STYLED);
}
?>

<imagecreatetruecolorimagedestroy>
 Last updated: Thu, 19 May 2005
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: The Server Pages
Last updated: Thu May 19 17:35:34 2005 CDT