Garry's Mod Wiki

render.SetScissorRect

render.SetScissorRect( number startX, number startY, number endX, number endY, boolean enable )

Description

Sets a scissoring rect which limits the drawing area.

Arguments

1 number startX
X start coordinate of the scissor rect.
2 number startY
Y start coordinate of the scissor rect.
3 number endX
X end coordinate of the scissor rect.
4 number endY
Y end coordinate of the scissor rect.
5 boolean enable
Enable or disable the scissor rect.

Example

Shows how to use this function. This will cut the white rectangle from full screen to 512x512 box in top left corner

render.SetScissorRect( 0, 0, 512, 512, true ) -- Enable the rect draw.RoundedBox( 4, 0, 0, ScrW(), ScrH(), color_white ) -- Draw a white rectangle over the whole screen render.SetScissorRect( 0, 0, 0, 0, false ) -- Disable after you are done

Page Links


Special Pages


Wikis

?

Render Time: 60ms

Session 0
DB GetPage 4
Generate Html 17
SaveChanges 13
Render Body 0
Render Sidebar 24