From e48530d3913132ed0d369cf50639820060640201 Mon Sep 17 00:00:00 2001
From: Julian Viereck <julian.viereck@gmail.com>
Date: Thu, 20 Sep 2012 21:48:18 +0200
Subject: [PATCH] Fix AppendText after API changes

---
 src/canvas.js  |  2 +-
 test/driver.js | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/canvas.js b/src/canvas.js
index 8ee20a0ae..9ccc7317e 100644
--- a/src/canvas.js
+++ b/src/canvas.js
@@ -793,7 +793,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
       if (textSelection) {
         geom.canvasWidth = canvasWidth;
         this.textLayer.appendText(font.fallbackName, fontSize, geom);
-      }`
+      }
 
       return canvasWidth;
     },
diff --git a/test/driver.js b/test/driver.js
index a493edb00..d10cda2a0 100644
--- a/test/driver.js
+++ b/test/driver.js
@@ -168,23 +168,23 @@ SimpleTextLayerBuilder.prototype = {
   endLayout: function SimpleTextLayerBuilder_EndLayout() {
     this.ctx.restore();
   },
-  appendText: function SimpleTextLayerBuilder_AppendText(text, fontName,
-                                                         fontSize) {
+  appendText: function SimpleTextLayerBuilder_AppendText(fontName, fontSize,
+                                                          geom) {
     var ctx = this.ctx, viewport = this.viewport;
     // vScale and hScale already contain the scaling to pixel units
-    var fontHeight = fontSize * text.geom.vScale;
+    var fontHeight = fontSize * geom.vScale;
     ctx.beginPath();
     ctx.strokeStyle = 'red';
     ctx.fillStyle = 'yellow';
-    ctx.rect(text.geom.x, text.geom.y - fontHeight,
-             text.canvasWidth * text.geom.hScale, fontHeight);
+    ctx.rect(geom.x, geom.y - fontHeight,
+             geom.canvasWidth * geom.hScale, fontHeight);
     ctx.stroke();
     ctx.fill();
 
     var textContent = this.textContent.text[this.textCounter];
     ctx.font = fontHeight + 'px ' + fontName;
     ctx.fillStyle = 'black';
-    ctx.fillText(textContent, text.geom.x, text.geom.y);
+    ctx.fillText(textContent, geom.x, geom.y);
 
     this.textCounter++;
   },