From 0a186150f085c34462b8c6cd5257849c73f80b65 Mon Sep 17 00:00:00 2001 From: scuri Date: Wed, 2 Dec 2009 20:30:55 +0000 Subject: New: driver SVG. --- src/lua5/cdlua5ctx.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/lua5') diff --git a/src/lua5/cdlua5ctx.c b/src/lua5/cdlua5ctx.c index e3bd19e..4d97f3b 100644 --- a/src/lua5/cdlua5ctx.c +++ b/src/lua5/cdlua5ctx.c @@ -1,5 +1,5 @@ /***************************************************************************\ -* $Id: cdlua5ctx.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ +* $Id: cdlua5ctx.c,v 1.2 2009/12/02 20:31:02 scuri Exp $ * * \***************************************************************************/ @@ -23,6 +23,7 @@ #include "cdclipbd.h" #include "cdmf.h" #include "cdps.h" +#include "cdsvg.h" #include "cddbuf.h" #include "cdgdiplus.h" @@ -687,6 +688,24 @@ static cdluaContext cdluapsctx = 0 }; +/***************************************************************************\ +* CD_SVG. * +\***************************************************************************/ +static void *cdsvg_checkdata( lua_State *L, int param) +{ + return (void *)luaL_checkstring(L, param); +} + +static cdluaContext cdluasvgctx = +{ + 0, + "SVG", + cdContextSVG, + cdsvg_checkdata, + NULL, + 0 +}; + /***************************************************************************\ * CD_PRINTER. * \***************************************************************************/ @@ -793,6 +812,7 @@ void cdlua_initdrivers(lua_State * L, cdluaLuaState* cdL) cdlua_addcontext(L, cdL, &cdluacgmctx); cdlua_addcontext(L, cdL, &cdluamfctx); cdlua_addcontext(L, cdL, &cdluapsctx); + cdlua_addcontext(L, cdL, &cdluasvgctx); cdlua_addcontext(L, cdL, &cdluaclipboardctx); cdlua_addcontext(L, cdL, &cdluanativewindowctx); cdlua_addcontext(L, cdL, &cdluaprinterctx); -- cgit v1.2.3