Page 1 of 1

GetStrokeColor with stroke_pattern

Posted: 2007-01-21T22:20:03-07:00
by rmabry
I asked about it in the Users forum,

http://redux.imagemagick.org/discourse- ... hp?p=25356

but maybe it is better here:

There is code in draw_private.h, in the function GetStrokeColor, that allows for strokes to be filled with a pattern, just as are fills. Is this not yet implemented in PerlMagick or the command line?

Rick

Posted: 2007-01-22T08:20:37-07:00
by magick
We'll add fill-pattern and stroke-pattern to Annotate() and Draw() or PerlMagick in the next point release. In the mean-time you can annotate/draw from an MVG script which permits fill and stroke patterns.

Posted: 2007-01-24T20:54:59-07:00
by rmabry
magick wrote: We'll add fill-pattern and stroke-pattern to Annotate() and Draw() or PerlMagick in the next point release.


How about the command line?

Posted: 2007-01-25T06:13:10-07:00
by magick
We'll add -fill-pattern and -stroke-pattern to the command line in the next point release.

Posted: 2007-01-25T07:52:00-07:00
by rmabry
magick wrote: We'll add -fill-pattern and -stroke-pattern to the command line in the next point release.


Cool. Is -fill-pattern synonymous with -tile? And how does the -origin setting fit inhere? I can imagine situations where an independent origin for strokes and fills is desirable. On a commandline it makes sense to have

Code: Select all

... -origin +20+20 -stroke-pattern stroker.png -origin +100+25 -fill-pattern filler.png ...
.

What about in PerMagick? Does the order of options and settings act the same way?

Code: Select all

...
$image->Draw(..., origin => "+20+20", 
                 stroke-pattern => $stroker, 
                 origin => "+100+25",  
                 -fill-pattern => $filler, ...);
...

Posted: 2007-01-25T08:38:28-07:00
by magick
After some thought, and noticing how it works in the drawing module, we'll enhance -fill and -stroke to accept filenames as a parameter on the command line and in PerlMagick. For example,
  • -stroke stroke.png
This feature will be available within the next few days in ImageMagick 6.3.2-2 Beta. We'll make sure -origin updates the patterns.

Posted: 2007-01-28T22:02:57-07:00
by anthony
Now that makes a lot of sense for these color options. It will also obsolete the current usage of -tile in convert, opening the way for this setting to have more montage like usage in convert

However I can see people then wanting -background 'tile_image' and so on. Arrrggghhhhh.....

When you document you better make it clear that "tile_image" is only usable for
-fill and -stroke settings.

I still also need to example the use of 'origin' in tile drawing, though that will be in the 'draw' section of IM Examples, even though it is used in many other places.

WARNING: currently -tile is NOT used to override -fill for label: and caption:. This change may also effect that aspect of IM so some extra testing may be needed, to determine the extent of the change.