Garry's Mod Wiki

draw.RoundedBox

draw.RoundedBox( number cornerRadius, number x, number y, number width, number height, table color )

Description

Draws a rounded rectangle.

If you intend to draw a non-rounded rectangle, then it's more efficient to use surface.DrawRect.

<rendercontext hook="false" type="2D"/>

Arguments

1 number cornerRadius
Radius of the rounded corners, works best with a multiple of 2.
2 number x
The x coordinate of the top left of the rectangle.
3 number y
The y coordinate of the top left of the rectangle.
4 number width
The width of the rectangle.
5 number height
The height of the rectangle.
6 table color
The color to fill the rectangle with. Uses the Color.

Page Links


Special Pages


Wikis

?

Render Time: 45ms

Session 0
DB GetPage 2
Generate Html 20
SaveChanges 15
Render Body 0
Render Sidebar 5