I can fill a polygon with a color:
Code: Select all
use Image::Magick;
my $image = new Image::Magick(size=>'300x300');
$image->Read('xc:transparent');
$image->Draw(primitive=>'polygon', points=>"100,50 100,200 200,150 200,100", fill=>'green');
$image->Write(filename=>'polyfill.png');
Code: Select all
use Image::Magick;
my $image = new Image::Magick(size=>'300x300');
$image->Read('xc:transparent');
$image->Draw(primitive=>'polygon', points=>"100,50 100,200 200,150 200,100", tile=>'mytile.png');
$image->Write(filename=>'polyfill.png');
Code: Select all
convert -size 300x300 xc:transparent -fill green -draw "polygon 100,50 100,200 200,150 200,100" mytry.png
convert -size 300x300 xc:transparent -tile mytile.png -draw "polygon 100,50 100,200 200,150 200,100" mytry.png
Rick (running IM 6.3.0 on Win XP)