Skip to content

scissor

fun <T> GuiGraphics.scissor(
    minX: Int, 
    minY: Int, 
    maxX: Int, 
    maxY: Int, 
    block: () -> T
): T

Runs block with scissoring enabled to the [minX, minY, maxX, maxY) rectangle, disabling it again afterwards. Saves the manual enableScissor(...) / disableScissor() pairing renderers otherwise need around clipped content.

fun <T> GuiGraphics.scissor(rect: IntRect, block: () -> T): T

Overload of scissor taking the clip bounds as an IntRect.