summaryrefslogtreecommitdiff
path: root/src/lua3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua3')
-rw-r--r--src/lua3/cdluactx.c24
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);