Personal tools


From JC2-MP Documentation

< Lua‎ | Client‎ | Render
Jump to: navigation, search

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


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))
Events:Subscribe("Render", Foo)

Lua Render Set Clip Example.jpg