Lua/Client/Render/Functions/SetClip
From JC2-MP Documentation
| Returns | none | 
|---|---|
| Prototype | Render:SetClip(bool enabled) | 
| Description | Turns clipping on or off | 
| Returns | none | 
|---|---|
| Prototype | Render:SetClip(bool enabled, Vector2 position, Vector2 size) | 
| Description | Turns clipping on or off and sets the area to clip | 
Examples
function Foo() -- Set the clipping rect. Render:SetClip(true, Render.Size * 0.25, Render.Size * 0.5) -- Try to render a green overlay over the entire screen. Render:FillArea(Vector2.Zero, Render.Size, Color(0, 255, 0, 127)) end Events:Subscribe("Render", Foo)


