mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 10:48:38 -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) {
|
||||
ctx.save();
|
||||
this.matrix.applyToContext(ctx);
|
||||
var image = this._canvas ? this._canvas : this.image;
|
||||
ctx.drawImage(image, -this.size.width / 2, -this.size.height / 2);
|
||||
ctx.drawImage(this._canvas || this.image,
|
||||
-this.size.width / 2, -this.size.height / 2);
|
||||
ctx.restore();
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue