Subject: | Problem with dashedLine() |
GD 2.19 perl 5.8.4
Also problematic with 2.23
#!/usr/bin/perl
# Seems to be a bug with the dashedLine func
#
use GD;
$width= 512;
$height = 512;
$im = new GD::Image($width, $height);
# allocate some colors
$white = $im->colorAllocate(255,255,255);
$green = $im->colorAllocate(0,255, 0);
$red = $im->colorAllocate(255,0,0);
$blue = $im->colorAllocate(0,0,255);
#$im->dashedLine(100, 50, 300, 51, $green);
$im->dashedLine(300, 45, 200, 44, $green); # this line turns out to be a box!!!
$png_data = $im->png;
open (FILE, ">testGD.png") || die;
binmode FILE;
print FILE $png_data;
close FILE;