Code: Select all
convert -size 150x100 xc:white -stroke red -strokewidth 4 -draw "polygon 20,20 130,20 130,80" filltest-cmd.png
Code: Select all
#!/usr/bin/perl --
use Image::Magick;
my $image = new Image::Magick;
$image->Set(size => '150x100');
$image->Read('xc:white');
$image->Draw(primitive=>'polygon', points=>'20,20 130,20 130,80',
stroke=>'red', strokewidth=>4);
$image->Write('filltest-pl.png');
Rick