[magick-users] Fill pattern in rectangle using PerlMagick
Draw('primitive' => 'rectangle', ..)
Ramsden, John
John.Ramsden at lorien.co.uk
Thu Jul 20 03:25:51 PDT 2006
Wow, many thanks, that's wonderful, and it certainly does work with
rectangles.
Here's a summary of the code, in case anyone else may find it useful:
$image = Image::Magick->new(); # main image (e.g. bar charts)
:::
$tile = Image::Magick->new();
$ret = $tile->Read('pattern:gray95');
$ret = %image->Draw('primitive' => 'rectangle',
'points' => "$x1,$y1,$x2,$y2",
'tile' => $tile);
Now I have a related question, on something I'm sure should be simple,
but I haven't so far been able to find the solution among the vast
and bewildering variety of IM features:
How does one combine a built-in pattern with a colour, i.e. either
set a background colour, and/or change the colour of the pattern
itself? Nothing in Mogrify() seems to fit the bill.
Cheers
John R Ramsden
-----Original Message-----
From: koyaanisqatsi at imagemagick.org
[mailto:koyaanisqatsi at imagemagick.org]
Sent: 19 July 2006 20:10
To: magick-users at imagemagick.org; Ramsden, John
Subject: re: [magick-users] Fill pattern in rectangle using PerlMagick
Draw('primitive' => 'rectangle', ..)
> can't for the life of me figure out how to get ImageMagick to tile a rectangle
The ImageMagick source distribution includes the shapes.pl script in the
PerlMagick/demo folder. It tiles inside a polygon primitive but should work
with rectangles as well.
**********************************************************************
The information contained in this email is confidential and is intended for the recipient only. If you have received it in error, please notify us immediately by reply email and then delete it from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person or store or copy this information in any medium. The views contained in this email are those of the author and not necessarily those of Lorien plc.
Thank you for your co-operation.
**********************************************************************
More information about the Magick-users
mailing list