Pass:setScissor

Edit

Sets the scissor rectangle. Any pixels outside the scissor rectangle will not be drawn.



Arguments

NameTypeDescription
xnumber The x coordinate of the upper-left corner of the scissor rectangle.
ynumber The y coordinate of the upper-left corner of the scissor rectangle.
wnumber The width of the scissor rectangle.
hnumber The height of the scissor rectangle.

Returns

Nothing

Disable the scissor.

Arguments

None

Returns

Nothing

Notes

x and y can not be negative. w and h must be positive.

By default, the scissor covers the entire canvas.

See also