Subject: | Drawing circle bug |
Using the following code below I get a rogue line in the bottom right of
the image. I think this is a bug in gd unless I'm doing something
wrong... I tested with 2.35 on both LINUX and windows.
Thanks
#!/usr/bin/perl
use strict;
use GD;
my $size = 20;
my $mid = int ($size / 2);
my $circle = new GD::Image($size,$size);
my $white = $circle->colorAllocate(255,255,255);
my $black = $circle->colorAllocate(0,0,0);
my $fill = $circle->colorAllocate(125,125,125);
$circle->transparent($white);
$circle->filledArc($mid,$mid,$size,$size,0,360,$fill);
$circle->arc($mid,$mid,$size,$size,0,360,$white);
my $file = "test.png";
open( PNG, ">$file") || die "Can't open $file\n";
binmode PNG;
print PNG $circle->png;
close PNG;