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) → {}
Name | Type | Description |
---|---|---|
renderer | PIXI.Renderer |
The renderer this System works for. |
Summary
Methods from ScissorSystem
void |
|
void |
|
void |
|
boolean |
|
Properties inherited from AbstractMaskSystem
Array<PIXI.MaskData> |
|
Methods inherited from AbstractMaskSystem
void |
Destroys the mask stack. |
number |
Gets count of masks of certain type. |
void |
|
Public Methods
calcScissorRect(maskData: PIXI.MaskData) → {void}
evaluates _boundsTransformed, _scissorRect for MaskData
Name | Type | Description |
---|---|---|
maskData | PIXI.MaskData |
Type | Description |
---|---|
void |
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.
Name | Type | Attributes | Description |
---|---|---|---|
maskData | PIXI.MaskData |
<optional> |
The mask data. |
Type | Description |
---|---|
void |
push(maskData: PIXI.MaskData) → {void}
Applies the Mask and adds it to the current stencil stack.
Name | Type | Description |
---|---|---|
maskData | PIXI.MaskData |
The mask data. |
Type | Description |
---|---|
void |
testScissor(maskData: PIXI.MaskData) → {boolean}
Test, whether the object can be scissor mask with current renderer projection. Calls "calcScissorRect()" if its true.
Name | Type | Description |
---|---|---|
maskData | PIXI.MaskData |
mask data |
Type | Description |
---|---|
boolean |
whether Whether the object can be scissor mask |