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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
#include <lua.h>
#include <lauxlib.h>
#include <nanovg.h>
#include <nanovg_gl.h>
#include "nvg.h"
int nvgShapeAntiAlias_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
int enabled = lua_toboolean(L, 2);
nvgShapeAntiAlias(*ctx, enabled);
return 0;
}
int nvgStrokeColor_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
NVGcolor *color = luaL_checkudata(L, 2, nvg_color_tname);
nvgStrokeColor(*ctx, *color);
return 0;
}
int nvgStrokePaint_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
NVGpaint *paint = luaL_checkudata(L, 2, nvg_paint_tname);
nvgStrokePaint(*ctx, *paint);
return 0;
}
int nvgFillColor_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
NVGcolor *color = luaL_checkudata(L, 2, nvg_color_tname);
nvgFillColor(*ctx, *color);
return 0;
}
int nvgFillPaint_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
NVGpaint *paint = luaL_checkudata(L, 2, nvg_paint_tname);
nvgFillPaint(*ctx, *paint);
return 0;
}
int nvgMiterLimit_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
float limit = luaL_checknumber(L, 2);
nvgMiterLimit(*ctx, limit);
return 0;
}
int nvgStrokeWidth_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
float width = luaL_checknumber(L, 2);
nvgStrokeWidth(*ctx, width);
return 0;
}
int nvgLineCap_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
int cap = luaL_checkinteger(L, 2);
nvgLineCap(*ctx, cap);
return 0;
}
int nvgLineJoin_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
int join = luaL_checkinteger(L, 2);
nvgLineJoin(*ctx, join);
return 0;
}
int nvgGlobalAlpha_bind(lua_State *L)
{
NVGcontext **ctx = luaL_checkudata(L, 1, nvg_ctx_tname);
float alpha = luaL_checknumber(L, 2);
nvgGlobalAlpha(*ctx, alpha);
return 0;
}
|