Revert recent changes to Item#rasterize() so pull request #150 can be merged.

This commit is contained in:
Jürg Lehni 2013-02-14 19:40:30 -08:00
parent 80638372b6
commit 334fe99503

View file

@ -1103,15 +1103,12 @@ var Item = this.Item = Base.extend(Callback, {
scale = (resolution || 72) / 72,
canvas = CanvasProvider.getCanvas(bounds.getSize().multiply(scale)),
ctx = canvas.getContext('2d'),
matrix = new Matrix().scale(scale).translate(-bounds.x, -bounds.y)
.concatenate(this._matrix);
matrix = new Matrix().scale(scale).translate(-bounds.x, -bounds.y);
matrix.applyToContext(ctx);
// TODO: Decide how to handle _matrix
// XXX: Decide how to handle _matrix
this.draw(ctx, {});
var raster = new Raster(canvas);
raster.setBounds(bounds);
// NOTE: We don't need to release the canvas since it now belongs to the
// Raster!
return raster;
},