diff options
author | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:18:43 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:18:43 -0700 |
commit | 25e85e1b809ec58ecac0f2e8fe48f74836f8e131 (patch) | |
tree | a53caef2257fefdd6610a17427fd14ee656bbc92 /cd/src/lua3 | |
parent | 7c0c85a86aa73c0c495523f994f8412e377a8195 (diff) |
Upgrading to CD 5.3
Diffstat (limited to 'cd/src/lua3')
-rwxr-xr-x | cd/src/lua3/cdluactx.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cd/src/lua3/cdluactx.c b/cd/src/lua3/cdluactx.c index fc09313..1ddd8e6 100755 --- a/cd/src/lua3/cdluactx.c +++ b/cd/src/lua3/cdluactx.c @@ -24,6 +24,7 @@ #include "cdclipbd.h" #include "cdmf.h" #include "cdps.h" +#include "cdsvg.h" #include "cddbuf.h" #include "cdgdiplus.h" @@ -779,6 +780,28 @@ static cdContextLUA cdluapsctx = }; /***************************************************************************\ +* CD_SVG. * +\***************************************************************************/ +static void *cdsvg_checkdata(int param) +{ + lua_Object data = lua_getparam(param); + if (!lua_isstring(data)) + lua_error("cdCreateCanvas CD_SVG: data should be of type string!"); + + return lua_getstring(data); +} + +static cdContextLUA cdluasvgctx = +{ + 0, + "CD_SVG", + cdContextSVG, + cdsvg_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ * CD_PRINTER. * \***************************************************************************/ static void *cdprinter_checkdata(int param) @@ -940,6 +963,7 @@ void cdlua_initdrivers(void) cdlua_addcontext(&cdluacgmctx); cdlua_addcontext(&cdluamfctx); cdlua_addcontext(&cdluapsctx); + cdlua_addcontext(&cdluasvgctx); cdlua_addcontext(&cdluaclipboardctx); cdlua_addcontext(&cdluanativewindowctx); cdlua_addcontext(&cdluaprinterctx); |