summaryrefslogtreecommitdiff
path: root/tex/generic/context/luatex/luatex-swiglib-test.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-04-06 15:00:22 +0300
committerMarius <mariausol@gmail.com>2013-04-06 15:00:22 +0300
commit99c647f91806e9b73970a8e252af5a7974d5a57d (patch)
tree19306fbe23ad3b1617edda7c4aa47a9ac44a1ea9 /tex/generic/context/luatex/luatex-swiglib-test.lua
parentd0342a37af2ced0e9b350e01ab3eaa2311f0cdb9 (diff)
downloadcontext-99c647f91806e9b73970a8e252af5a7974d5a57d.tar.gz
beta 2013.04.05 22:00
Diffstat (limited to 'tex/generic/context/luatex/luatex-swiglib-test.lua')
-rw-r--r--tex/generic/context/luatex/luatex-swiglib-test.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/tex/generic/context/luatex/luatex-swiglib-test.lua b/tex/generic/context/luatex/luatex-swiglib-test.lua
new file mode 100644
index 000000000..db6a72909
--- /dev/null
+++ b/tex/generic/context/luatex/luatex-swiglib-test.lua
@@ -0,0 +1,25 @@
+local gm = swiglib("gmwand.core")
+
+gm.InitializeMagick(".")
+
+local magick_wand = gm.NewMagickWand()
+local drawing_wand = gm.NewDrawingWand()
+
+gm.MagickSetSize(magick_wand,800,600)
+gm.MagickReadImage(magick_wand,"xc:red")
+
+gm.DrawPushGraphicContext(drawing_wand)
+
+gm.DrawSetFillColor(drawing_wand,gm.NewPixelWand())
+
+-- gm.DrawSetFont(drawing_wand, kpse.findfile("DejaVuSerifBold.ttf"))
+-- gm.DrawSetFontSize(drawing_wand, 96)
+-- gm.DrawAnnotation(drawing_wand,300,200, "LuaTeX")
+
+gm.DrawPopGraphicContext(drawing_wand)
+gm.MagickDrawImage(magick_wand,drawing_wand)
+
+gm.MagickWriteImages(magick_wand,"./luatex-swiglib-test.jpg",1)
+
+gm.DestroyDrawingWand(drawing_wand)
+gm.DestroyMagickWand(magick_wand)