Antialias problem with Draw()
Posted: 2007-08-10T19:10:38-07:00
Hi! I have a script with the following lines of code:
My problem is that fourth and last [red] rectangle that is coming out antialiased with lots of shading on the edges, which isn't what I want. I can only think of 2 differences between the fourth call to Draw() and the first three: the fourth one uses a user-specified color and also, it draws on top of 2 other rectangles, where the others draw on 0 and 1 rectangle, respectively. Any suggestions?
Code: Select all
$color = "#ff0000";
my $x = $image->Draw(fill=>'#000000',primitive=>'rectangle',points=>"0,0 $width,$height",antialias=>0);
$x && warn $x;
$x = $image->Draw(fill=>'#ffffff',primitive=>'rectangle',points=>"1,$whitestart $greywidth, $greyheight", antialias=>0);
$x && warn $x;
$greyheight -= $barheight;
$x = $image->Draw(fill=>'#eeeeee', primitive=>'rectangle',points=>"1,1 $greywidth,$barheight",antialias=>0);
$x && warn $x;
$x = $image->Draw(fill=>$color, primitive=>'rectangle',points=>"1,1 $barwidth,$barheight",antialias=>0);
$x && warn $x;