mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Simplify Raster#draw().
This commit is contained in:
parent
689ddf7555
commit
e1bcd70059
1 changed files with 2 additions and 2 deletions
|
@ -122,8 +122,8 @@ Raster = Item.extend({
|
||||||
draw: function(ctx) {
|
draw: function(ctx) {
|
||||||
ctx.save();
|
ctx.save();
|
||||||
this.matrix.applyToContext(ctx);
|
this.matrix.applyToContext(ctx);
|
||||||
var image = this._canvas ? this._canvas : this.image;
|
ctx.drawImage(this._canvas || this.image,
|
||||||
ctx.drawImage(image, -this.size.width / 2, -this.size.height / 2);
|
-this.size.width / 2, -this.size.height / 2);
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
Reference in a new issue