el_supremo wrote:Both of these are in C but you should be able to figure out how to do the same thing in Magick++
See the last piece of code posted by user "fisheggs" in this thread:
viewtopic.php?f=2&t=9346
And in my "MagickWand Examples in C", see the Pattern (second) text effect in "Eight text effects in one function"
http://members.shaw.ca/el.supremo/MagickWand/
Pete
Thanks Pete, you're nice
By following your tips, I finally figured it out, though still with some questions left.
First let me mention my solution, it's simple and got by chance:
Code: Select all
img = Image("640x480", "transparent")
img.read("pattern:checkerboard")
img.write("out_checkerboard.png")
I believe the read method behaves differently when given the parameter "pattern:checkerboard" other than "checkerboard.png", which I suppose is just the same with the IM command line does.
While experimenting I came up with a question. If I use
Code: Select all
img.fillPattern(Image("checkerboard.png"))
instead of
Code: Select all
img.fillPattern(Image("pattern:checkerboard"))
I got the following result
compared to
I am a little confused about the two behaviors, anyway I'll continue checking it out
The second question is in Magick++ I didn't find a DrawableSetFillPatternURL method. And I am not much clear about the definition of the first parameter (id_) of the DrawablePushPattern method. So I'm looking forward to having any relative tips/hints about the usage of DrawablePushPattern/DrawablePopPattern method in Magick++. Many thanks.
Regards,
milkyjing