From bc4af3b47260ee0f79343303b135d1ea32cde4d4 Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 17 Feb 2023 00:48:10 -0600 Subject: begin remove honeysuckle refactor --- src/nvg/frame.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/nvg/frame.c (limited to 'src/nvg/frame.c') diff --git a/src/nvg/frame.c b/src/nvg/frame.c new file mode 100644 index 0000000..0012431 --- /dev/null +++ b/src/nvg/frame.c @@ -0,0 +1,32 @@ +#include +#include +#include +#include "nvg.h" + + +int nvgBeginFrame_bind(lua_State *L) +{ + struct NVGcontext **vg = luaL_checkudata(L, 1, nvg_ctx_tname); + float width = luaL_checknumber(L, 2); + float height = luaL_checknumber(L, 3); + float pixelRatio = luaL_checknumber(L, 4); + + nvgBeginFrame(*vg, width, height, pixelRatio); + return 0; +} + + +int nvgCancelFrame_bind(lua_State *L) +{ + struct NVGcontext **vg = luaL_checkudata(L, 1, nvg_ctx_tname); + nvgCancelFrame(*vg); + return 0; +} + + +int nvgEndFrame_bind(lua_State *L) +{ + struct NVGcontext **vg = luaL_checkudata(L, 1, nvg_ctx_tname); + nvgEndFrame(*vg); + return 0; +} -- cgit v1.2.1