mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
parent
fd1a517e84
commit
c0abbe1459
1 changed files with 4 additions and 1 deletions
|
@ -751,13 +751,16 @@ var Raster = Item.extend(/** @lends Raster# */{
|
|||
}
|
||||
},
|
||||
|
||||
_draw: function(ctx) {
|
||||
_draw: function(ctx, param, viewMatrix) {
|
||||
var element = this.getElement();
|
||||
if (element) {
|
||||
// Handle opacity for Rasters separately from the rest, since
|
||||
// Rasters never draw a stroke. See Item#draw().
|
||||
ctx.globalAlpha = this._opacity;
|
||||
|
||||
// Call _setStyles() to make sure shadow is drawn (#1437).
|
||||
this._setStyles(ctx, param, viewMatrix);
|
||||
|
||||
// Set context smoothing value according to raster property.
|
||||
// There's no need to restore original value after drawing due to
|
||||
// the call to ctx.restore() in Item#draw() after this method call.
|
||||
|
|
Loading…
Reference in a new issue