mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add explanatory comments to Raster#transformContent().
This commit is contained in:
parent
763fc95776
commit
c3d02bbd16
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue