summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html/en/history.html2
-rw-r--r--html/examples/iup_dbuffer.wlua3
-rw-r--r--mak.vc9/cdcore.vcproj8
-rw-r--r--src/lua5/cdlua5ctx.c63
4 files changed, 73 insertions, 3 deletions
diff --git a/html/en/history.html b/html/en/history.html
index 2eadf72..6aac73c 100644
--- a/html/en/history.html
+++ b/html/en/history.html
@@ -32,6 +32,8 @@
initialization. Pattern orientation was upside down.</li>
<li><span style="color: #FF0000">Fixed:</span> alpha transparency in <strong>
CanvasArc</strong> and Bezier polygon in the IMAGERGB driver.</li>
+ <li><span style="color: #FF0000">Fixed:</span> missed implementation for
+ CD_DEBUG, CD_PICTURE and CD_DBUFFERRGB in Lua.</li>
</ul>
<h3><a href="http://sourceforge.net/projects/canvasdraw/files/5.3/">Version 5.3</a> (26/Jan/2010)</h3>
<ul>
diff --git a/html/examples/iup_dbuffer.wlua b/html/examples/iup_dbuffer.wlua
index 3f33746..dffccfd 100644
--- a/html/examples/iup_dbuffer.wlua
+++ b/html/examples/iup_dbuffer.wlua
@@ -14,7 +14,8 @@ dlg = iup.dialog{box; title="Example IUPLUA/CDLUA"}
function cnv:map_cb()
local canvas = cd.CreateCanvas(cd.IUP, self)
- local dbuffer = cdCreateCanvas(cd.DBUFFER, canvas);
+ local dbuffer = cd.CreateCanvas(cd.DBUFFERRGB, canvas);
+-- local dbuffer = cd.CreateCanvas(cd.DBUFFER, canvas);
self.canvas = canvas -- store the CD canvas in a IUP attribute
self.dbuffer = dbuffer
end
diff --git a/mak.vc9/cdcore.vcproj b/mak.vc9/cdcore.vcproj
index ad3ac36..d9343d5 100644
--- a/mak.vc9/cdcore.vcproj
+++ b/mak.vc9/cdcore.vcproj
@@ -424,6 +424,10 @@
>
</File>
<File
+ RelativePath="..\include\cdpicture.h"
+ >
+ </File>
+ <File
RelativePath="..\include\cdprint.h"
>
</File>
@@ -432,6 +436,10 @@
>
</File>
<File
+ RelativePath="..\include\cdsvg.h"
+ >
+ </File>
+ <File
RelativePath="..\include\cdwmf.h"
>
</File>
diff --git a/src/lua5/cdlua5ctx.c b/src/lua5/cdlua5ctx.c
index 4d97f3b..b4c899b 100644
--- a/src/lua5/cdlua5ctx.c
+++ b/src/lua5/cdlua5ctx.c
@@ -1,5 +1,5 @@
/***************************************************************************\
-* $Id: cdlua5ctx.c,v 1.2 2009/12/02 20:31:02 scuri Exp $
+* $Id: cdlua5ctx.c,v 1.3 2010/04/23 14:27:10 scuri Exp $
* *
\***************************************************************************/
@@ -25,7 +25,9 @@
#include "cdps.h"
#include "cdsvg.h"
#include "cddbuf.h"
-#include "cdgdiplus.h"
+#include "cddebug.h"
+#include "cdpicture.h"
+
#include <lua.h>
#include <lauxlib.h>
@@ -321,6 +323,24 @@ static cdluaContext cdluadbufctx =
};
/***************************************************************************\
+* CD_DBUFFERRGB. *
+\***************************************************************************/
+static void *cddbufrgb_checkdata(lua_State * L, int param)
+{
+ return cdlua_checkcanvas(L, param);
+}
+
+static cdluaContext cdluadbufrgbctx =
+{
+ 0,
+ "DBUFFERRGB",
+ cdContextDBufferRGB,
+ cddbufrgb_checkdata,
+ NULL,
+ 0
+};
+
+/***************************************************************************\
* CD_IMAGE. *
\***************************************************************************/
static void *cdimage_checkdata(lua_State *L, int param)
@@ -620,6 +640,42 @@ static int emf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h)
}
/***************************************************************************\
+* CD_PICTURE. *
+\***************************************************************************/
+static void *cdpicture_checkdata(lua_State *L,int param)
+{
+ return (void *)luaL_checkstring(L,param);
+}
+
+static cdluaContext cdluapicturectx =
+{
+ 0,
+ "PICTURE",
+ cdContextPicture,
+ cdpicture_checkdata,
+ NULL,
+ 0
+};
+
+/***************************************************************************\
+* CD_DEBUG. *
+\***************************************************************************/
+static void *cddebug_checkdata(lua_State *L,int param)
+{
+ return (void *)luaL_checkstring(L,param);
+}
+
+static cdluaContext cdluadebugctx =
+{
+ 0,
+ "DEBUG",
+ cdContextDebug,
+ cddebug_checkdata,
+ NULL,
+ 0
+};
+
+/***************************************************************************\
* CD_METAFILE. *
\***************************************************************************/
static void *cdmetafile_checkdata(lua_State *L,int param)
@@ -811,6 +867,8 @@ void cdlua_initdrivers(lua_State * L, cdluaLuaState* cdL)
cdlua_addcontext(L, cdL, &cdluadgnctx);
cdlua_addcontext(L, cdL, &cdluacgmctx);
cdlua_addcontext(L, cdL, &cdluamfctx);
+ cdlua_addcontext(L, cdL, &cdluadebugctx);
+ cdlua_addcontext(L, cdL, &cdluapicturectx);
cdlua_addcontext(L, cdL, &cdluapsctx);
cdlua_addcontext(L, cdL, &cdluasvgctx);
cdlua_addcontext(L, cdL, &cdluaclipboardctx);
@@ -819,4 +877,5 @@ void cdlua_initdrivers(lua_State * L, cdluaLuaState* cdL)
cdlua_addcontext(L, cdL, &cdluawmfctx);
cdlua_addcontext(L, cdL, &cdluaemfctx);
cdlua_addcontext(L, cdL, &cdluadbufctx);
+ cdlua_addcontext(L, cdL, &cdluadbufrgbctx);
}