0
0liver 'ojo' Bedf0rd
The following code:
#!/usr/bin/perl -w
use strict;
use GD;
my $im = new GD::Image(500,500);
my $white = $im->colorAllocate(255,255,255);
my $black = $im->colorAllocate(0,0,0);
my $red = $im->colorAllocate(255,0,0);
my $blue = $im->colorAllocate(0,0,255);
$im->arc(100,100,50,50,90,90,$blue);
$im->filledArc(200,200,50,50,90,90,$red,gdEdged|gdNoFill);
binmode STDOUT;
print $im->png;
produces full (360 °) circles in the output image, although I would
have guessed that no output at all (or a single pixel/line) is produced.
I still find it more sensible to assume that if start and end angle
are the same "minimal" output is created and not the "maximum" one.
So: am I wrong or is this a bug in GD?
Oliver
#!/usr/bin/perl -w
use strict;
use GD;
my $im = new GD::Image(500,500);
my $white = $im->colorAllocate(255,255,255);
my $black = $im->colorAllocate(0,0,0);
my $red = $im->colorAllocate(255,0,0);
my $blue = $im->colorAllocate(0,0,255);
$im->arc(100,100,50,50,90,90,$blue);
$im->filledArc(200,200,50,50,90,90,$red,gdEdged|gdNoFill);
binmode STDOUT;
print $im->png;
produces full (360 °) circles in the output image, although I would
have guessed that no output at all (or a single pixel/line) is produced.
I still find it more sensible to assume that if start and end angle
are the same "minimal" output is created and not the "maximum" one.
So: am I wrong or is this a bug in GD?
Oliver