PIXI.ScissorSystem

class ScissorSystem extends PIXI.AbstractMaskSystem

System plugin to the renderer to manage scissor masking.

Scissor masking discards pixels outside of a rectangle called the scissor box. The scissor box is in the framebuffer viewport's space; however, the mask's rectangle is projected from world-space to viewport space automatically by this system.

Constructor


new PIXI.ScissorSystem(renderer: PIXI.Renderer) → {}
Parameters:
Name Type Description
renderer PIXI.Renderer

The renderer this System works for.

Summary


Properties inherited from AbstractMaskSystem

Methods inherited from AbstractMaskSystem

void
destroy()

Destroys the mask stack.

number
getStackLength()

Gets count of masks of certain type.

void
setMaskStack(maskStack: Array<PIXI.MaskData>)

Public Methods


calcScissorRect ScissorSystem.ts:43
calcScissorRect(maskData: PIXI.MaskData) → {void}

evaluates _boundsTransformed, _scissorRect for MaskData

Parameters:
Name Type Description
maskData PIXI.MaskData
Returns:
Type Description
void
pop ScissorSystem.ts:174
pop(maskData: PIXI.MaskData) → {void}

This should be called after a mask is popped off the mask stack. It will rebind the scissor box to be latest with the last mask in the stack.

This can also be called when you directly modify the scissor box and want to restore PixiJS state.

Parameters:
Name Type Attributes Description
maskData PIXI.MaskData

<optional>

The mask data.

Returns:
Type Description
void
push ScissorSystem.ts:150
push(maskData: PIXI.MaskData) → {void}

Applies the Mask and adds it to the current stencil stack.

Parameters:
Name Type Description
maskData PIXI.MaskData

The mask data.

Returns:
Type Description
void
testScissor ScissorSystem.ts:87
testScissor(maskData: PIXI.MaskData) → {boolean}

Test, whether the object can be scissor mask with current renderer projection. Calls "calcScissorRect()" if its true.

Parameters:
Name Type Description
maskData PIXI.MaskData

mask data

Returns:
Type Description
boolean

whether Whether the object can be scissor mask


Powered by webdoc!