diff options
author | scuri <scuri> | 2009-12-02 20:30:55 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-12-02 20:30:55 +0000 |
commit | 0a186150f085c34462b8c6cd5257849c73f80b65 (patch) | |
tree | f78781174c5f64d032efa0760a0ac06af8f8447b /src/lua3 | |
parent | 3914ec6505021df1b3edac7a0b2648ace33e4ef4 (diff) |
New: driver SVG.
Diffstat (limited to 'src/lua3')
-rw-r--r-- | src/lua3/cdluactx.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lua3/cdluactx.c b/src/lua3/cdluactx.c index fc09313..1ddd8e6 100644 --- a/src/lua3/cdluactx.c +++ b/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); |