1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use Tk; use Image::Magick; my $image = Image::Magick->new; $image->Set(size=>'1014x636'); $image->ReadImage('xc:white'); $image->Annotate( text => "Testtext", family => Arial, pointsize => 18, x => 5, y => 5, stroke => "yellow", strokewidth => 2 ); $image->Write('test.png'); exit;
stroke => "",
1 2 3 4 5 6 7 8 9 10 11 12
%extra_annotate_parameter = ( family => Arial, pointsize => 18, stroke => "yellow", strokewidth => 2 ); $image->Annotate( text => "Testtext", x => 5, y => 5, %extra_annotate_parameter );
1 2 3 4 5 6 7 8
$extra_annotate_parameter{family} = 'Courier'; $extra_annotate_parameter{stroke} = 'green'; $image->Annotate( text => "Testtext", x => 5, y => 5, %extra_annotate_parameter );
1 2 3 4 5 6
$image->Annotate( %default_annotate_params, text => "Testtext", pointsize => 36, # extra large x => 5, y => 5);
1 2 3 4 5 6 7 8 9
$hash{foo} = "bar"; $hash{boo} = "far"; # oder %hash = ( %hash, foo => "bar", boo => "far", );