From 2d50871034e8c6982ec34dc088c48fd35c76f03d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 18 Feb 2017 16:13:49 +0100 Subject: [PATCH] Remove LuaCairo.color_to_rgba (now Ardour.LuaAPI.color_to_rgba) --- gtk2_ardour/luainstance.cc | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/gtk2_ardour/luainstance.cc b/gtk2_ardour/luainstance.cc index 32ce2341ee..966715edc0 100644 --- a/gtk2_ardour/luainstance.cc +++ b/gtk2_ardour/luainstance.cc @@ -21,7 +21,6 @@ #include #include "gtkmm2ext/gui_thread.h" -#include "canvas/colors.h" #include "ardour/audioengine.h" #include "ardour/diskstream.h" @@ -313,30 +312,6 @@ class PangoLayout { Glib::RefPtr _layout; }; -/** expand RGBA color to parameters - * - * convert a Canvas::Color (uint32_t 0xRRGGBBAA) into - * double RGBA values which can be passed as parameters to - * Cairo::Context::set_source_rgba - * - * @returns r, g, b, a - */ -static int color_to_rgba (lua_State *L) -{ - int top = lua_gettop (L); - if (top < 1) { - return luaL_argerror (L, 1, "invalid number of arguments, color_to_rgba (uint32_t)"); - } - uint32_t color = luabridge::Stack::get (L, 1); - double r, g, b, a; - ArdourCanvas::color_to_rgba (color, r, g, b, a); - luabridge::Stack ::push (L, r); - luabridge::Stack ::push (L, g); - luabridge::Stack ::push (L, b); - luabridge::Stack ::push (L, a); - return 4; -} - }; // namespace //////////////////////////////////////////////////////////////////////////////// @@ -540,11 +515,6 @@ LuaInstance::bind_cairo (lua_State* L) .addConst ("WordChar", Pango::WRAP_WORD_CHAR) .endNamespace () - - .endNamespace () - - .beginNamespace ("LuaCairo") - .addCFunction ("color_to_rgba", &LuaCairo::color_to_rgba) .endNamespace (); /* Lua/cairo bindings operate on Cairo::Context, there is no Cairo::RefPtr wrapper [yet].