Class: CanvasMaskManager


A set of functions used to handle masking.

Sprite masking is not supported on the CanvasRenderer.

new PIXI.CanvasMaskManager (renderer)

Name Type Description
renderer PIXI.CanvasRenderer

The canvas renderer.


destroy () void

Destroys this canvas mask manager.

popMask (renderer) void

Restores the current drawing context to the state it was before the mask was applied.

Name Type Description
renderer PIXI.CanvasRenderer

The renderer context to use.

pushMask (maskData) void

This method adds it to the current stack of masks.

Name Type Description
maskData PIXI.MaskData | PIXI.Graphics

the maskData that will be pushed

recursiveFindShapes (container, out) void

Renders all PIXI.Graphics shapes in a subtree.

Name Type Description
container PIXI.Container

container to scan.

out Array<PIXI.Graphics>

where to put found shapes

renderGraphicsShape (graphics) void

Renders a PIXI.Graphics shape.

Name Type Description
graphics PIXI.Graphics

The object to render.