summaryrefslogtreecommitdiff
path: root/src/nvg/state.c
blob: e2ab73a5dc9710832c585837f9372e578418d498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <lua.h>
#include <lauxlib.h>
#include <nanovg.h>
#include <nanovg_gl.h>
#include "nvg.h"


int nvgSave_bind(lua_State *L)
{
	NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
	nvgSave(*ctx);
	return 0;
}


int nvgRestore_bind(lua_State *L)
{
	NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
	nvgRestore(*ctx);
	return 0;
}


int nvgReset_bind(lua_State *L)
{
	NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
	nvgReset(*ctx);
	return 0;
}