diff options
author | sanine <sanine.not@pm.me> | 2023-02-17 00:48:10 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-02-17 00:48:10 -0600 |
commit | bc4af3b47260ee0f79343303b135d1ea32cde4d4 (patch) | |
tree | 8be0e99b99f3ed70e8514737da0babad0a27a84e /src/nvg/frame.c | |
parent | 71af5331b108d6407c791e3859af41ef2b379483 (diff) |
begin remove honeysuckle refactor
Diffstat (limited to 'src/nvg/frame.c')
-rw-r--r-- | src/nvg/frame.c | 32 |
1 files changed, 32 insertions, 0 deletions
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 <lua.h> +#include <lauxlib.h> +#include <nanovg.h> +#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; +} |