use Image::Magick;
-#$font = '-adobe-helvetica-medium-r-normal--25-180-100-100-p-130-iso8729-1';
-#$font = 'Times';
-$font = 'Generic.ttf';
-
$image = Image::Magick->new();
$x = 100;
$y = 100;
my ($label);
print "angle $angle\n";
- $label=Image::Magick->new(size=>"600x600",pointsize=>24,font=>$font);
+ $label=Image::Magick->new(size=>"600x600",pointsize=>24);
$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');
$q->Read('gradient:#00f685-#0083f8');
$q->Rotate(-90);
$q->Raise('6x6');
-$q->Annotate(text=>'Push Me',font=>'Generic.ttf',fill=>'black',
- gravity=>'Center',pointsize=>18);
+$q->Annotate(text=>'Push Me',fill=>'black',gravity=>'Center',pointsize=>18);
$q->Write('button.gif');
$q->Write('win:');
use Image::Magick;
-#$font = '-adobe-helvetica-medium-r-normal--25-180-100-100-p-130-iso8729-1';
-#$font = 'Times';
-$font = 'Generic.ttf';
-
$image = Image::Magick->new();
$smile = Image::Magick->new();
$smile->Read('smile.gif');
my ($thumbnail);
print "angle $angle\n";
- $thumbnail=Image::Magick->new(size=>"600x600",pointsize=>24,font=>$font,
- fill=>'black');
+ $thumbnail=Image::Magick->new(size=>"600x600",pointsize=>24,fill=>'black');
$thumbnail->Read("xc:white");
$thumbnail->Draw(primitive=>'line',points=>"300,100 300,500",stroke=>'#600');
$thumbnail->Draw(primitive=>'line',points=>"100,300 500,300",stroke=>'#600');
print "Annotate...\n";
$example=$model->Clone();
$example->Label('Annotate');
-$example->Annotate(text=>'Magick',geometry=>'+0+20',font=>'Generic.ttf',
- fill=>'gold',gravity=>'North',pointsize=>14);
+$example->Annotate(text=>'Magick',geometry=>'+0+20',fill=>'gold',
+ gravity=>'North',pointsize=>14);
push(@$images,$example);
print "Auto-gamma...\n";
#
print "Montage...\n";
$montage=$images->Montage(geometry=>'128x160+8+4>',gravity=>'Center',
- tile=>'5x+10+200',compose=>'over',background=>'#ffffff',font=>'Generic.ttf',
- pointsize=>18,fill=>'#600',stroke=>'none',shadow=>'true');
+ tile=>'5x+10+200',compose=>'over',background=>'#ffffff',pointsize=>18,
+ fill=>'#600',stroke=>'none',shadow=>'true');
$logo=Image::Magick->new();
$logo->Read('logo:');
#
# Draw text.
#
-$image->Annotate(text=>'This is a test!',geometry=>'+30+140',
- font=>'Generic.ttf',fill=>'green',pointsize=>24,rotate=>45.0);
+$image->Annotate(text=>'This is a test!',geometry=>'+30+140',fill=>'green',
+ pointsize=>24,rotate=>45.0);
$image->Write('piddle.gif');
$image->Write('piddle.mvg');
$image->Write('win:');
$image=Image::Magick->new(size=>'500x120');
$image->Read('xc:white');
-$image->Annotate(font=>'Generic.ttf',fill=>'rgba(100,100,100,0.8)',
- pointsize=>60, text=>'Works like magick!',geometry=>'+30+90');
+$image->Annotate(fill=>'rgba(100,100,100,0.8)',pointsize=>60,
+ text=>'Works like magick!',geometry=>'+30+90');
$image->Blur('0x1');
-$image->Annotate(font=>'Generic.ttf',fill=>'red',stroke=>'blue',pointsize=>60,
+$image->Annotate(fill=>'red',stroke=>'blue',pointsize=>60,
text=>'Works like magick!',geometry=>'+26+86');
$image->Write('shadow.gif');
$image->Write('win:');
#
# Draw text.
#
-$image->Annotate(fill=>'red',geometry=>'+150+20',font=>'Generic.ttf',
- pointsize=>18,text=>'Hello world!');
-$image->Annotate(fill=>'blue',geometry=>'+150+38',font=>'Generic.ttf',
- pointsize=>14,text=>'Goodbye cruel world!');
-$image->Annotate(fill=>'black',geometry=>'+280+120',font=>'Generic.ttf',
- pointsize=>14,text=>"I'm climbing the wall!",rotate=>90.0);
+$image->Annotate(fill=>'red',geometry=>'+150+20',pointsize=>18,
+ text=>'Hello world!');
+$image->Annotate(fill=>'blue',geometry=>'+150+38',pointsize=>14,
+ text=>'Goodbye cruel world!');
+$image->Annotate(fill=>'black',geometry=>'+280+120',pointsize=>14,
+ text=>"I'm climbing the wall!",rotate=>90.0);
#
# Write image.
#