Circle not anti-aliased correctly.
| From: | Charles Bradshaw | Date: | Fri, 15 Jan 2010 12:00:07 +0000 |
| Subject: | Circle not anti-aliased correctly. | ||
| Groups: | php.gd.devel | ||
| Request: | Send a blank email to php-gd-devel+get-640@lists.php.net to get a copy of this message | ||
Hope this is right list, if not I apologize in advance.
I am using libgd.2.0.0 installed under Ubuntu. Synaptic says libgd2-xpm
V2.0.36 and libgd-dg2-perl V2.39-2
I have generated dg.png using the following perl:
#!/usr/local/bin/perl
use strict;
use GD;
my $gd = GD::Image->new(400,400, 1); # true-color
my $black = $gd->colorAllocate(0,0,0);
my $white = $gd->colorAllocate(255,255,255);
$gd->setAntiAliased($black);
$gd->filledRectangle( 0,0, 399,399, $white);
$gd->line(0,0,399,100,gdAntiAliased);
$gd->arc(200,200,200,200,0,360,gdAntiAliased);
open(IMG,">","gd.png");
binmode IMG;
print IMG $gd->png;
The result is here:
http://www.bradcan.homelinux.com/test/gd.png
The line is correctly anti-aliased, but the circle is NOT.
I would have expected the result to look something like this:
http://www.bradcan.homelinux.com/test/gimp.png
What's wrong? Did I miss something?
TIA