[magick-users] Fill pattern in rectangle
usingPerlMagickDraw('primitive' => 'rectangle', ..)
Ramsden, John
John.Ramsden at lorien.co.uk
Wed Jul 19 04:46:54 PDT 2006
Thanks for your reply Ron. Generically, what I am trying to
do is produce an image of a bog standard bar chart, on a white
background (i.e. starting from a blank canvas), as follows:
| X Y
| Y X X Y
|__X_Y___X_Y___X_Y___ ...
i.e. a sequence of bar "groups", in which I am drawing each bar
as a rectangle, and to distinguish each bar type I am hoping to
fill them with a distinct pattern such as an array of dots or a
hatching. (Colour-filling helps, but the images may be monochrome
printed.)
I know there's a perl module GD::Graph that would do most of what
is needed. But I thought it would be nice to use ImageMagick, both
to gain experience in it and perhaps also produce a slightly more
polished image (e.g. with antialiasing of lines).
So far everything has worked out fine, except for this blasted
pattern-filling of the rectangles.
You ask about backgrounds and foregrounds, but perhaps that is
part of what needs clarifying, given the task I've described.
Basically I just think of the whole graph as a pen-plot, i.e.
vector graphics (and text) application, which I know is not what
ImageMagick is primarily about; but as it does include drawing
primitives and fill patterns, I naturally assumed there must be
some way of combining these to achieve what is needed.
Cheers
John
-----Original Message-----
From: Ron Savage [mailto:ron at savage.net.au]
Sent: 19 July 2006 11:35
To: List - ImageMagick Users
Subject: RE: [magick-users] Fill pattern in rectangle
usingPerlMagickDraw('primitive' => 'rectangle', ..)
On Wed, 19 Jul 2006 10:26:58 +0100, Ramsden, John wrote:
Hi John
> So my question is what extra code must I add to tile a rectangle I
> am plotting as above by a pattern such as 'pattern:crosshatch'.
I too am mystified. For me it's: What exactly are you trying to do?
I think you need to specify the steps in English.
Your code created images - it did not reveal to what end you are going to employ
those images.
Are you trying to create a rectangle, and then use that as the tile?
Put it like this: What exactly is your background, and what exactly is your
foreground? Define those and them we can consider combining them.
After that, we might consider using the Draw() method to tile one image on top
of another one.
> I'm grateful for these, but the PerlMagick documentation for Draw()
> seems pretty sketchy.
True.
--
Cheers
Ron Savage, ron at savage.net.au on 19/07/2006
http://savage.net.au/index.html
Let the record show: Microsoft is not an Australian company
_______________________________________________
Magick-users mailing list
Magick-users at imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users
**********************************************************************
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