Draw fill default
Posted: 2006-12-23T11:33:00-07:00
From the command line, the following generates a triangle filled with black, so it seems the default is the same as if adding -fill black.
However, in PerlMagick, the following generates an unfilled triangle, so the default is the same as if adding fill => 'none'.
Which is desirable? My own feeling is that the perl version is best - if you want a fill say so, otherwise you don't get one.
Rick
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