summaryrefslogtreecommitdiff
path: root/src/lua5
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua5')
-rw-r--r--src/lua5/imlua_image.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lua5/imlua_image.c b/src/lua5/imlua_image.c
index 77cc499..9900e7d 100644
--- a/src/lua5/imlua_image.c
+++ b/src/lua5/imlua_image.c
@@ -2,7 +2,7 @@
* \brief IM Lua 5 Binding
*
* See Copyright Notice in im_lib.h
- * $Id: imlua_image.c,v 1.8 2010/01/15 17:23:13 scuri Exp $
+ * $Id: imlua_image.c,v 1.9 2010/01/17 18:18:12 scuri Exp $
*/
#include <string.h>
@@ -128,6 +128,15 @@ static int imluaImageAddAlpha (lua_State *L)
}
/*****************************************************************************\
+ image:SetAlpha()
+\*****************************************************************************/
+static int imluaImageSetAlpha (lua_State *L)
+{
+ imImageSetAlpha(imlua_checkimage(L, 1), (float)luaL_checknumber(L, 2));
+ return 0;
+}
+
+/*****************************************************************************\
image:Reshape()
\*****************************************************************************/
static int imluaImageReshape (lua_State *L)
@@ -1016,6 +1025,7 @@ static const luaL_reg imimage_lib[] = {
static const luaL_reg imimage_metalib[] = {
{"Destroy", imluaImageDestroy},
{"AddAlpha", imluaImageAddAlpha},
+ {"SetAlpha", imluaImageSetAlpha},
{"Reshape", imluaImageReshape},
{"Copy", imluaImageCopy},
{"CopyData", imluaImageCopyData},