From 4bdd52d56a70ebe338178408b3d2f3d51ceae497 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 10 Jul 2014 16:05:41 +0200 Subject: [PATCH] CLuaInstance::CPictureNew: Add parameter 'transparent' for cpicture.new - Default is CFrameBuffer::TM_NONE (No 'pseudo' transparency) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e991507888c00704f08b93696ea8a507a592f093 Author: Michael Liebmann Date: 2014-07-10 (Thu, 10 Jul 2014) ------------------ This commit was generated by Migit --- src/gui/luainstance.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 3d4a29788..26577d955 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -1896,6 +1896,12 @@ int CLuaInstance::CPictureNew(lua_State *L) lua_Integer color_background = (lua_Integer)COL_MENUCONTENT_PLUS_0; lua_Integer color_shadow = (lua_Integer)COL_MENUCONTENTDARK_PLUS_0; + /* + transparency = CFrameBuffer::TM_BLACK (2): Transparency when black content ('pseudo' transparency) + transparency = CFrameBuffer::TM_NONE (1): No 'pseudo' transparency + */ + lua_Integer transparency = CFrameBuffer::TM_NONE; + tableLookup(L, "parent" , (void**)&parent); tableLookup(L, "x" , x); tableLookup(L, "y" , y); @@ -1912,12 +1918,13 @@ int CLuaInstance::CPictureNew(lua_State *L) tableLookup(L, "color_frame" , color_frame); tableLookup(L, "color_background" , color_background); tableLookup(L, "color_shadow" , color_shadow); + tableLookup(L, "transparency" , transparency); CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL; CLuaPicture **udata = (CLuaPicture **) lua_newuserdata(L, sizeof(CLuaPicture *)); *udata = new CLuaPicture(); - (*udata)->cp = new CComponentsPicture(x, y, dx, dy, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow); + (*udata)->cp = new CComponentsPicture(x, y, dx, dy, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow, transparency); (*udata)->parent = pw; luaL_getmetatable(L, "cpicture"); lua_setmetatable(L, -2);