Skip to content

drawRect

Draws a rectangle outline.

TIP

All drawing functions should be called within a render callback/loop.

Syntax

lua
Ham.drawRect(startPos, endPos, color, rounding, flags, thickness)

Parameters

NameTypeDescription
startPostableTop-left position {x, y}
endPostableBottom-right position {x, y}
colortableColor {r, g, b, a}
roundingfloatCorner rounding radius (0-100)
flagsintegerRounding corner flags
thicknessintegerLine thickness (1-100)

Example

lua
Ham.drawRect({50, 50}, {150, 150}, {255, 255, 255, 255}, 5, 0, 1)

See Also

Released under the ISC License.