summaryrefslogtreecommitdiff
path: root/src/nvg/nvg.h
blob: 33a24208bd68e94509d065ef73ed8508181a2e20 (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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#ifndef HONEY_VECTOR_H
#define HONEY_VECTOR_H

#include <lua.h>


extern const char *nvg_ctx_tname;
extern const char *nvg_color_tname;
extern const char *nvg_paint_tname;


#define NVG_FUNCTIONS \
	/* context */ \
	X("CreateContext", nvgCreateContext_bind) \
	X("DeleteContext", nvgDeleteContext_bind) \
 \
	/* frame control */ \
	X("BeginFrame", nvgBeginFrame_bind) \
	X("CancelFrame", nvgCancelFrame_bind) \
	X("EndFrame", nvgEndFrame_bind) \
 \
	/* composite operation */ \
	X("GlobalCompositeOperation", nvgGlobalCompositeOperation_bind) \
	X("GlobalCompositeBlendFunc", nvgGlobalCompositeBlendFunc_bind) \
	X("GlobalCompositeBlendFuncSeparate", nvgGlobalCompositeBlendFuncSeparate_bind) \
 \
	/* color utils */ \
	X("RGB", nvgRGB_bind) \
	X("RGBf", nvgRGBf_bind) \
	X("RGBA", nvgRGBA_bind) \
	X("RGBAf", nvgRGBAf_bind) \
	X("LerpRGBA", nvgLerpRGBA_bind) \
	X("TransRGBA", nvgTransRGBA_bind) \
	X("TransRGBAf", nvgTransRGBAf_bind) \
	X("HSL", nvgHSL_bind) \
	X("HSLA", nvgHSLA_bind) \
 \
	/* state handling */ \
	X("Save", nvgSave_bind) \
	X("Restore", nvgRestore_bind) \
	X("Reset", nvgReset_bind) \
 \
	/* render styles */ \
	X("ShapeAntiAlias", nvgShapeAntiAlias_bind) \
	X("StrokeColor", nvgStrokeColor_bind) \
	X("StrokePaint", nvgStrokePaint_bind) \
	X("FillColor", nvgFillColor_bind) \
	X("FillPaint", nvgFillPaint_bind) \
	X("MiterLimit", nvgMiterLimit_bind) \
	X("StrokeWidth", nvgStrokeWidth_bind) \
	X("LineCap", nvgLineCap_bind) \
	X("LineJoin", nvgLineJoin_bind) \
	X("GlobalAlpha", nvgGlobalAlpha_bind) \
 \
	/* transforms */ \
	X("ResetTransform", nvgResetTransform_bind) \
	X("Transform", nvgTransform_bind) \
	X("Translate", nvgTranslate_bind) \
	X("Rotate", nvgRotate_bind) \
	X("SkewX", nvgSkewX_bind) \
	X("SkewY", nvgSkewY_bind) \
	X("Scale", nvgScale_bind) \
	X("CurrentTransform", nvgCurrentTransform_bind) \
	/* X("TransformIdentity", nvgTransformIdentity_bind) */ \
	/* X("TransformTranslate", nvgTransformTranslate_bind) */ \
	/* X("TransformScale", nvgTransformScale_bind) */ \
	/* X("TransformRotate", nvgTransformRotate_bind) */ \
	/* X("TransformSkewX", nvgTransformSkewX_bind) */ \
	/* X("TransformSkewY", nvgTransformSkewY_bind) */ \
	/* X("TransformMultiply", nvgTransformMultiply_bind) */ \
	/* X("TransformPremultiply", nvgTransformPremultiply_bind) */ \
	/* X("TransformInverse", nvgTransformInverse_bind) */ \
	/* X("TransformPoint", nvgTransformPoint_bind) */ \
 \
	/* images */ \
	X("CreateImage", nvgCreateImage_bind) \
	/* X("CreateImageMem", nvgCreateImageMem_bind) */ \
	/* X("CreateImageRGBA", nvgCreateImageRGBA_bind) */ \
	/* X("UpdateImage", nvgUpdateImage_bind) */ \
	X("ImageSize", nvgImageSize_bind) \
	X("DeleteImage", nvgDeleteImage_bind) \
 \
	/* paints */ \
	X("LinearGradient", nvgLinearGradient_bind) \
	X("BoxGradient", nvgBoxGradient_bind) \
	X("RadialGradient", nvgRadialGradient_bind) \
	X("ImagePattern", nvgImagePattern_bind) \
 \
	/* scissoring */ \
	X("Scissor", nvgScissor_bind) \
	X("IntersectScissor", nvgIntersectScissor_bind) \
	X("ResetScissor", nvgResetScissor_bind) \
 \
	/* paths */ \
	X("BeginPath", nvgBeginPath_bind) \
	X("MoveTo", nvgMoveTo_bind) \
	X("LineTo", nvgLineTo_bind) \
	X("BezierTo", nvgBezierTo_bind) \
	X("QuadTo", nvgQuadTo_bind) \
	X("ArcTo", nvgArcTo_bind) \
	X("ClosePath", nvgClosePath_bind) \
	X("PathWinding", nvgPathWinding_bind) \
	X("Arc", nvgArc_bind) \
	X("Rect", nvgRect_bind) \
	X("RoundedRect", nvgRoundedRect_bind) \
	X("RoundedRectVarying", nvgRoundedRectVarying_bind) \
	X("Ellipse", nvgEllipse_bind) \
	X("Circle", nvgCircle_bind) \
	X("Fill", nvgFill_bind) \
	X("Stroke", nvgStroke_bind) \
 \
	/* text */ \
	X("CreateFont", nvgCreateFont_bind) \
	X("CreateFontAtIndex", nvgCreateFontAtIndex_bind) \
	X("CreateFontMem", nvgCreateFontMem_bind) \
	X("CreateFontMemAtIndex", nvgCreateFontMemAtIndex_bind) \
	X("FindFont", nvgFindFont_bind) \
	X("AddFallbackFontId", nvgAddFallbackFontId_bind) \
	X("AddFallbackFont", nvgAddFallbackFont_bind) \
	X("ResetFallbackFontsId", nvgResetFallbackFontsId_bind) \
	X("ResetFallbackFonts", nvgResetFallbackFonts_bind) \
	X("FontSize", nvgFontSize_bind) \
	X("FontBlur", nvgFontBlur_bind) \
	X("TextLetterSpacing", nvgTextLetterSpacing_bind) \
	X("TextLineHeight", nvgTextLineHeight_bind) \
	X("TextAlign", nvgTextAlign_bind) \
	X("FontFaceId", nvgFontFaceId_bind) \
	X("FontFace", nvgFontFace_bind) \
	X("Text", nvgText_bind) \
	X("TextBox", nvgTextBox_bind) \
	X("TextBounds", nvgTextBounds_bind) \
	X("TextBoxBounds", nvgTextBoxBounds_bind) \
	X("TextGlyphPositions", nvgTextGlyphPositions_bind) \
	X("TextMetrics", nvgTextMetrics_bind) \
	X("TextBreakLines", nvgTextBreakLines_bind) \

	
/* function declarations */
#define X(unused, name) int name(lua_State *L);
NVG_FUNCTIONS
#undef X

#endif