summaryrefslogtreecommitdiff
path: root/src/lua5
diff options
context:
space:
mode:
authorscuri <scuri>2010-05-21 21:54:49 +0000
committerscuri <scuri>2010-05-21 21:54:49 +0000
commit95a0b9f784c2c4eddd86e51eac3a1ae9394cdf49 (patch)
tree2153b840982d2ccdc621a387e0d5110baa5267e0 /src/lua5
parentcc487d4de29a48d8e20a9a8492957a5950d5c181 (diff)
*** empty log message ***
Diffstat (limited to 'src/lua5')
-rw-r--r--src/lua5/cdlua5.c13
-rw-r--r--src/lua5/cdlua5_canvas.c7
2 files changed, 20 insertions, 0 deletions
diff --git a/src/lua5/cdlua5.c b/src/lua5/cdlua5.c
index 954389c..bb40ecb 100644
--- a/src/lua5/cdlua5.c
+++ b/src/lua5/cdlua5.c
@@ -1428,8 +1428,21 @@ static const struct cdlua5_constant cdlibconstant[] = {
{"CLIP" , CD_CLIP},
{"BEZIER" , CD_BEZIER},
{"REGION" , CD_REGION},
+ {"PATH" , CD_PATH},
{"POLYCUSTOM" , CD_POLYCUSTOM},
+ /* path actions */
+ {"PATH_NEW", CD_PATH_NEW},
+ {"PATH_MOVETO", CD_PATH_MOVETO},
+ {"PATH_LINETO", CD_PATH_LINETO},
+ {"PATH_ARC", CD_PATH_ARC},
+ {"PATH_CURVETO", CD_PATH_CURVETO},
+ {"PATH_CLOSE", CD_PATH_CLOSE},
+ {"PATH_FILL", CD_PATH_FILL},
+ {"PATH_STROKE", CD_PATH_STROKE},
+ {"PATH_FILLSTROKE", CD_PATH_FILLSTROKE},
+ {"PATH_CLIP", CD_PATH_CLIP},
+
/* fill mode */
{"EVENODD", CD_EVENODD},
{"WINDING", CD_WINDING},
diff --git a/src/lua5/cdlua5_canvas.c b/src/lua5/cdlua5_canvas.c
index f3b929d..37d36b3 100644
--- a/src/lua5/cdlua5_canvas.c
+++ b/src/lua5/cdlua5_canvas.c
@@ -2205,6 +2205,12 @@ static int cdlua5_vertex(lua_State *L)
return 0;
}
+static int cdlua5_pathset(lua_State *L)
+{
+ cdCanvasPathSet(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2));
+ return 0;
+}
+
static int wdlua5_vertex(lua_State *L)
{
wdCanvasVertex(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3));
@@ -2429,6 +2435,7 @@ static const struct luaL_reg cdlib_canvas_meta[] = {
/* Polygon */
{"Begin" , cdlua5_begin},
+ {"PathSet" , cdlua5_pathset},
{"Vertex" , cdlua5_vertex},
{"wVertex" , wdlua5_vertex},
{"fVertex" , cdlua5_fvertex},