draw.RoundedBox

From Garry's Mod
Jump to: navigation, search
 draw.RoundedBox( )

Contents

Description

Draws a rounded rectangle.

NOTE

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

NOTE

This is a rendering function that requires a 2D rendering context.
This means that it will only work in hooks with a 2D rendering context.

Arguments

number cornerRadius

Radius of the rounded corners, works best with a multiple of 2.

Arguments

number x

The x coordinate of the top left of the rectangle.

Arguments

number y

The y coordinate of the top left of the rectangle.

Arguments

number width

The width of the rectangle.

Arguments

number height

The height of the rectangle.

Arguments

table color

The color to fill the rectangle with. Uses the Color structure.
Personal tools
Navigation