From c3d02bbd1667bf1f303a90a3f5b794b449d23815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 28 Feb 2011 20:17:59 +0100 Subject: [PATCH] Add explanatory comments to Raster#transformContent(). --- src/item/Raster.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/item/Raster.js b/src/item/Raster.js index 78c84bd1..6353e1d7 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -150,6 +150,13 @@ Raster = Item.extend({ }, transformContent: function(matrix, flags) { + // In order to set the right context transformation when drawing the + // raster, simply preconcatenate the internal matrix with the provided + // one. + this.matrix.preConcatenate(matrix); + // Now rotate the corner points of the image rectangle do find the + // extremas that define our raster's bounds, and update them straight + // away var width = this._size.width; var height = this._size.height; var x = width * -0.5;