Fixed bug where mask was not being applied to tilingSprite in canvas renderer
This commit is contained in:
parent
b0a3ff9447
commit
2e0b26d765
3 changed files with 21 additions and 1 deletions
|
@ -8050,6 +8050,11 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
|
||||||
|
|
||||||
var context = renderSession.context;
|
var context = renderSession.context;
|
||||||
|
|
||||||
|
if(this._mask)
|
||||||
|
{
|
||||||
|
renderSession.maskManager.pushMask(this._mask, context);
|
||||||
|
}
|
||||||
|
|
||||||
context.globalAlpha = this.worldAlpha;
|
context.globalAlpha = this.worldAlpha;
|
||||||
|
|
||||||
|
|
||||||
|
@ -8094,6 +8099,11 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
|
||||||
context.translate(-tilePosition.x, -tilePosition.y);
|
context.translate(-tilePosition.x, -tilePosition.y);
|
||||||
|
|
||||||
context.closePath();
|
context.closePath();
|
||||||
|
|
||||||
|
if(this._mask)
|
||||||
|
{
|
||||||
|
renderSession.maskManager.popMask(renderSession.context);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
PIXI.TilingSprite.prototype.getBounds = function()
|
PIXI.TilingSprite.prototype.getBounds = function()
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -147,6 +147,11 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
|
||||||
|
|
||||||
var context = renderSession.context;
|
var context = renderSession.context;
|
||||||
|
|
||||||
|
if(this._mask)
|
||||||
|
{
|
||||||
|
renderSession.maskManager.pushMask(this._mask, context);
|
||||||
|
}
|
||||||
|
|
||||||
context.globalAlpha = this.worldAlpha;
|
context.globalAlpha = this.worldAlpha;
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,6 +196,11 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
|
||||||
context.translate(-tilePosition.x, -tilePosition.y);
|
context.translate(-tilePosition.x, -tilePosition.y);
|
||||||
|
|
||||||
context.closePath();
|
context.closePath();
|
||||||
|
|
||||||
|
if(this._mask)
|
||||||
|
{
|
||||||
|
renderSession.maskManager.popMask(renderSession.context);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
PIXI.TilingSprite.prototype.getBounds = function()
|
PIXI.TilingSprite.prototype.getBounds = function()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue