From 7709d543806354bf7fbe405f7761830e463d9bc3 Mon Sep 17 00:00:00 2001
From: uid228608 <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]</pre>
   <p>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)</p>
+  canvas in the respective driver. It is not related with WD nor Transformation 
+	Matrix. Default values: (0, 0)</p>
 
 
 </div><div class="function"><pre class="function"><span class="mainFunction">void&nbsp;cdCanvasGetOrigin(cdCanvas* canvas, int *x, int *y); [in C]</span>
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 @@
 <body>
 
 <h2>History of Changes</h2>
-<h3>CVS (29/July/2010)</h3>
+<h3>CVS (05/Aug/2010)</h3>
 <ul>
 	<li>
 		<span class="hist_fixed">Fixed:</span> CD_GL static library for Visual 
@@ -35,6 +35,9 @@
 	<li>
 		<span class="hist_fixed">Fixed:</span> CD_QUERY in <strong>
 		cdCanvasNativeFont</strong>.</li>
+	<li>
+		<span class="hist_fixed">Fixed:</span> canvas:Transform when nil is used 
+		to reset the transformation.</li>
 </ul>
 <h3><a href="http://sourceforge.net/projects/canvasdraw/files/5.4/">Version 5.4</a> (24/June/2010)</h3>
 <ul>
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