Skip Menu |

This queue is for tickets about the GD CPAN distribution.

Report information
The Basics
Id: 13299
Status: resolved
Priority: 0/
Queue: GD

People
Owner: Nobody in particular
Requestors: handianfei99 [...] mails.tsinghua.edu.cn
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.19
Fixed in: (no value)



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;
This method is deprecated in libgd and apparently is broken in newer versions of the library. All that GD does is to pass the call to the C layer, so there's nothing I can do to fix this. You should use setStyled() and gdStyled as alternatives.
I should have mentioned that the method will be formally marked deprecated-do not use in the next version of GD.
Was deprecated with 2.27