Garry's Mod Wiki

surface.GetScissorRect

  boolean, number, number, number, number surface.GetScissorRect()

Recently Added

This was recently added in version (2026.02.26). It might only be available on the Dev Branch right now.

Description

Retrieves the currently active scissor rect for the surface library. A faster, narrower version of surface.GetPanelPaintState.

Useful for panel retrieving current panel's culling from PANEL:Paint.

This does NOT return values set by render.SetScissorRect.

Returns

1 boolean
Whether the scissor rect is active or not. If false, the following values should be ignored.
2 number
Left edge of the scissor rect.
3 number
Top edge of the scissor rect.
4 number
Right edge of the scissor rect.
5 number
Bottom edge of the scissor rect.