use strict; use warnings; use Image::Magick; my $label=Image::Magick->new(size=>"600x600",); $label->Read("xc:white"); $label->Draw(primitive=>'line',points=>"300,100 300,500",stroke=>'#600 +'); $label->Draw(primitive=>'line',points=>"100,300 500,300",stroke=>'#600 +'); $label->Draw(primitive=>'rectangle',points=>"100,100 500,500",fill=>'n +one', stroke=>'#600'); my $x = $label->Annotate( text=>"North West", x=>50, y=>50, pointsize=>40, font=>'C:\WINNT\Fonts\times.ttf', ); die "$x" if "$x"; $label->Write("annot.png");
(Most of the code is from the annotate.pl test in PerlMagick.)
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Image::Magick Annotate() doesn't look good by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |