From ff2ac484da0065e392d63ebfb287a37e1b7c84cf Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Thu, 24 Feb 2011 13:56:27 +0100 Subject: [PATCH] Raster: add todo and perform small cleanup. --- src/item/Raster.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/item/Raster.js b/src/item/Raster.js index 502b2dc6..9607050f 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -65,8 +65,8 @@ Raster = Item.extend({ var u = new Point(1, 0).transform(matrix).subtract(orig); var v = new Point(0, 1).transform(matrix).subtract(orig); return new Size( - 72.0 / u.length, - 72.0 / v.length + 72 / u.length, + 72 / v.length ); }, @@ -82,6 +82,8 @@ Raster = Item.extend({ getImage: function() { return this._image || this.canvas; }, + + // TODO: setImage // TODO: drawImage(image, point) drawImage: function(image, x, y) { @@ -140,6 +142,7 @@ Raster = Item.extend({ setCanvas: function(canvas) { if (this._canvas) CanvasProvider.returnCanvas(this._canvas); + this._image = null; this._ctx = null; this._canvas = canvas; },