Thanks Pete,
you pointed me to the right place to look.
I have found out how to do it with just the MagickWand API (and without touching <wand/magick-wand-private.h>).
Code: Select all
# without declarations or error checks
i_wand=NewMagickWand() # base image
t_wand=NewMagickWand() # image to tile with
d_wand=NewDrawingWand()
p_wand=NewPixelWand()
PixelSetColor(p_wand, "blue")
MagickNewImage(i_wand, 64, 64, p_wand) # base image, 64x64 blue
MagickReadImage(t_wand, "tile_weave.gif") # tile image
#
# *THIS* is the bit I couldn't figure out
#
DrawPushPattern(d_wand, "pick-a-name-any-name", 0, 0, 16, 16) # tile_weave is 16x16
DrawComposite(d_wand, SrcOverCompositeOp, 0, 0, 0, 0, t_wand)
DrawPopPattern(d_wand)
DrawSetFillPatternURL(d_wand, "#pick-a-name-any-name") # as above but with a '#'
# now draw circle
DrawCircle(d_wand, 32, 32, 8, 32)
MagickDrawImage(i_wand, d_wand)
# and write image
MagickWriteImages(i_wand, "64x64_blue_tile_wand_circle.png", 1)
I think I overlooked DrawSetFillPatternURL() because of the 'URL' in the name.
Anyway the result is

compared to the convert generated

so I'm happy.
(And off to log a bug against DrawSetFillPatternURL() which ALLWAYS returns MagickFalse.)
Thanks again