From 7709d543806354bf7fbe405f7761830e463d9bc3 Mon Sep 17 00:00:00 2001
From: uid228608
Date: Thu, 5 Aug 2010 17:45:23 +0000
Subject: *** empty log message ***
---
html/en/func/coordinates.html | 3 ++-
html/en/history.html | 5 ++++-
src/lua5/cdlua5_canvas.c | 6 ++++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/html/en/func/coordinates.html b/html/en/func/coordinates.html
index ffaed2a..55e9edc 100644
--- a/html/en/func/coordinates.html
+++ b/html/en/func/coordinates.html
@@ -77,7 +77,8 @@ canvas:fOrigin(x, y: number) [in Lua]
Allows translating the origin - for instance, to the center of the canvas.
The function profits from the architecture of the library to simulate a
translation of the origin, which in fact is never actually passed to the
- canvas in the respective driver. Default values: (0, 0)
+ canvas in the respective driver. It is not related with WD nor Transformation
+ Matrix. Default values: (0, 0)
void cdCanvasGetOrigin(cdCanvas* canvas, int *x, int *y); [in C]
diff --git a/html/en/history.html b/html/en/history.html
index 25c702f..1a11558 100644
--- a/html/en/history.html
+++ b/html/en/history.html
@@ -27,7 +27,7 @@
History of Changes
-CVS (29/July/2010)
+CVS (05/Aug/2010)
-
Fixed: CD_GL static library for Visual
@@ -35,6 +35,9 @@
-
Fixed: CD_QUERY in
cdCanvasNativeFont.
+ -
+ Fixed: canvas:Transform when nil is used
+ to reset the transformation.
diff --git a/src/lua5/cdlua5_canvas.c b/src/lua5/cdlua5_canvas.c
index 0ea9b1b..d6e9849 100644
--- a/src/lua5/cdlua5_canvas.c
+++ b/src/lua5/cdlua5_canvas.c
@@ -376,6 +376,12 @@ static int cdlua5_transform(lua_State *L)
double matrix[6];
int i;
+ if (lua_isnil(L, 2))
+ {
+ cdCanvasTransform(cdlua_checkcanvas(L, 1), NULL);
+ return 0;
+ }
+
if (!lua_istable(L, 2))
luaL_argerror(L, 2, "invalid matrix, must be a table");
--
cgit v1.2.3