Fixed bug where mask was not being applied to tilingSprite in canvas renderer

This commit is contained in:
Mat Groves 2014-01-16 16:33:05 +00:00
parent b0a3ff9447
commit 2e0b26d765
3 changed files with 21 additions and 1 deletions

View file

@ -8050,6 +8050,11 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
var context = renderSession.context;
if(this._mask)
{
renderSession.maskManager.pushMask(this._mask, context);
}
context.globalAlpha = this.worldAlpha;
@ -8094,6 +8099,11 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
context.translate(-tilePosition.x, -tilePosition.y);
context.closePath();
if(this._mask)
{
renderSession.maskManager.popMask(renderSession.context);
}
};
PIXI.TilingSprite.prototype.getBounds = function()