summaryrefslogtreecommitdiff
path: root/test/lua/render_cd.lua
diff options
context:
space:
mode:
authorscuri <scuri>2008-10-17 06:10:15 +0000
committerscuri <scuri>2008-10-17 06:10:15 +0000
commit5a422aba704c375a307a902bafe658342e209906 (patch)
tree5005011e086bb863d8fb587ad3319bbec59b2447 /test/lua/render_cd.lua
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'test/lua/render_cd.lua')
-rw-r--r--test/lua/render_cd.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lua/render_cd.lua b/test/lua/render_cd.lua
new file mode 100644
index 0000000..532f906
--- /dev/null
+++ b/test/lua/render_cd.lua
@@ -0,0 +1,15 @@
+require"imlua"
+require"cdlua"
+require"imlua_cd"
+
+local image = im.ImageCreate(500, 500, im.RGB, im.BYTE)
+local canvas = image:cdCreateCanvas() -- Creates a CD_IMAGERGB canvas
+
+canvas:Activate()
+canvas:Clear()
+canvas:Font("Times", cd.BOLD, 24)
+canvas:Text(100, 100, "Test")
+canvas:Line(0,0,100,100)
+canvas:Kill()
+
+image:Save("new.bmp", "BMP")