summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-swiglib-test.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-12-14 12:29:58 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2014-12-14 12:29:58 +0100
commitc029158f450cd96f71db2f2a4da72a5c946089c0 (patch)
tree1c5d30d6853f6deb57cc9818b8739106a2d5e03f /src/fontloader/misc/fontloader-swiglib-test.lua
parentea148be27d5a79fd11759856e0ab4033f328ce5a (diff)
parentca673f7b14af906606a188fd98978d3501842f63 (diff)
downloadluaotfload-c029158f450cd96f71db2f2a4da72a5c946089c0.tar.gz
Merge pull request #260 from phi-gamma/master
add import helper, new directory layout, revised letterspacing, fontloader gone nuts
Diffstat (limited to 'src/fontloader/misc/fontloader-swiglib-test.lua')
-rw-r--r--src/fontloader/misc/fontloader-swiglib-test.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/fontloader/misc/fontloader-swiglib-test.lua b/src/fontloader/misc/fontloader-swiglib-test.lua
new file mode 100644
index 0000000..db6a729
--- /dev/null
+++ b/src/fontloader/misc/fontloader-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)