note 37545 modified in function.imagedashedline by cece
| From: | cece@php.net | Date: | Mon, 29 Nov 2004 10:34:41 +0000 |
| Subject: | note 37545 modified in function.imagedashedline by cece | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-81143@lists.php.net to get a copy of this message | ||
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);
}
?>
--was--
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);
}
}
http://php.net/manual/en/function.imagedashedline.php