Code: Select all
$image->Draw(fill=>'red', primitive=>'rectangle',
points=>'20,20 100,100 40,40 200,200 60,60 300,300');
I'm wondering then, is it the page that's wrong, or is it something on my end?
Also, here's the source to a perl script to try it yourself:
Code: Select all
#!/usr/bin/perl
use strict;
use warnings;
use Image::Magick;
my $image = Image::Magick->new;
$image->Set('size'=>'320x320');
$image->ReadImage('xc:white');
$image->Draw('fill'=>'red', 'primitive'=>'rectangle',
'points'=>'20,20 100,100 40,40 200,200 60,60 300,300');
# To achieve what was intended by the previous line, uncomment
# the following three:
#$image->Draw('fill'=>'red', 'primitive'=>'rectangle', 'points'=>'20,20 100,100');
#$image->Draw('fill'=>'red', 'primitive'=>'rectangle', 'points'=>'40,40 200,200');
#$image->Draw('fill'=>'red', 'primitive'=>'rectangle', 'points'=>'60,60 300,300');
# The following line may be used to display the image on the screen,
# at least under X11
#$image->Display($ENV{'DISPLAY'});
$image->Write('output.png');
-- Sid