超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<imagecreatetruecolorimagedestroy>
Last updated: Fri, 22 Jun 2007

imagedashedline

(PHP 3, PHP 4 , PHP 5)

imagedashedline -- 画一虚线

说明

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

反对使用本函数。应该用 imagesetstyle()imageline() 的组合替代之。




add a note add a note User Contributed Notes
imagedashedline
michi at marel dot at
19-Nov-2003 10: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:

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: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22