summaryrefslogtreecommitdiff
path: root/test/lua/show_flower.wlua
diff options
context:
space:
mode:
authorscuri <scuri>2009-08-18 02:21:01 +0000
committerscuri <scuri>2009-08-18 02:21:01 +0000
commit77a4608ee1f828ed70ec58588f0229cd57758148 (patch)
treeb1550da93d53331715c200f1acf8a7c1b2ff7be9 /test/lua/show_flower.wlua
parente2726d7bef3b0a1684011e558cb68ca99cfecd75 (diff)
*** empty log message ***
Diffstat (limited to 'test/lua/show_flower.wlua')
-rw-r--r--test/lua/show_flower.wlua31
1 files changed, 0 insertions, 31 deletions
diff --git a/test/lua/show_flower.wlua b/test/lua/show_flower.wlua
deleted file mode 100644
index ec97a88..0000000
--- a/test/lua/show_flower.wlua
+++ /dev/null
@@ -1,31 +0,0 @@
-require"imlua"
-require"cdlua"
-require"cdluaim"
-require"iuplua"
-require"iupluacd"
-
-image = im.FileImageLoad("flower.jpg") -- directly load the image at index 0. it will open and close the file
-cnv = iup.canvas{rastersize = image:Width().."x"..image:Height(), border = "NO"}
-cnv.image = image -- store the new image in the IUP canvas as an attribute
-
-function cnv:map_cb() -- the CD canvas can only be created when the IUP canvas is mapped
- self.canvas = cd.CreateCanvas(cd.IUP, self)
-end
-
-function cnv:action() -- called everytime the IUP canvas needs to be repainted
- self.canvas:Activate()
- self.canvas:Clear()
- self.image:cdCanvasPutImageRect(self.canvas, 0, 0, 0, 0, 0, 0, 0, 0) -- use default values
-end
-
-dlg = iup.dialog{cnv}
-
-function dlg:close_cb()
- cnv.image:Destroy()
- cnv.canvas:Kill()
- self:destroy()
- return iup.IGNORE -- because we destroy the dialog
-end
-
-dlg:show()
-iup.MainLoop()