diff options
author | scuri <scuri> | 2010-01-17 18:15:37 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-01-17 18:15:37 +0000 |
commit | 4e85aff8dc79d680f9b507f30053a17d27bbca42 (patch) | |
tree | 0317efe750baf4120884c101a87a2ba41110c525 /src/lua5 | |
parent | 8b2047804cba012ffa63134d977f4ec025e840cd (diff) |
New: function imImageSetAlpha.
Diffstat (limited to 'src/lua5')
-rw-r--r-- | src/lua5/imlua_image.c | 12 |
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}, |