PushClipRect
Push a clipping rectangle onto the draw clip stack.
Syntax
Susano.PushClipRect(x, y, w, h[, intersect]) -> void
Parameters
x, y (number): Top-left corner of the clip region in pixels.
w, h (number): Width and height of the clip region in pixels.
intersect (boolean, optional): If true, intersects with the current clip rect. Default: true.
Return(s)
None
Behavior
All subsequent draw commands will be clipped to this rectangle until PopClipRect() is called. Clip rects can be nested. Must be paired with a matching PopClipRect().
Example(s)
Susano.BeginFrame()
Susano.PushClipRect(100, 100, 200, 150)
Susano.DrawRectFilled(50, 50, 300, 300, 1, 0, 0) -- only the part inside 100,100,200,150 is visible
Susano.PopClipRect()
Susano.SubmitFrame()