From 4e85aff8dc79d680f9b507f30053a17d27bbca42 Mon Sep 17 00:00:00 2001 From: scuri Date: Sun, 17 Jan 2010 18:15:37 +0000 Subject: New: function imImageSetAlpha. --- src/lua5/imlua_image.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/lua5/imlua_image.c') 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 @@ -127,6 +127,15 @@ static int imluaImageAddAlpha (lua_State *L) return 0; } +/*****************************************************************************\ + image:SetAlpha() +\*****************************************************************************/ +static int imluaImageSetAlpha (lua_State *L) +{ + imImageSetAlpha(imlua_checkimage(L, 1), (float)luaL_checknumber(L, 2)); + return 0; +} + /*****************************************************************************\ image:Reshape() \*****************************************************************************/ @@ -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}, -- cgit v1.2.3