Garry's Mod Wiki

Revision Difference

draw.RoundedBox#515359

<function name="RoundedBox" parent="draw" type="libraryfunc">⤶ <description>⤶ Draws a rounded rectangle.⤶ <note>If you intend to draw a non-rounded rectangle, then it's more efficient to use <page>surface.DrawRect</page>.</note>⤶ ⤶ <rendercontext hook="false" type="2D"/>⤶ </description>⤶ <realm>Client and Menu</realm>⤶ <file line="164-L173">lua/includes/modules/draw.lua</file>⤶ <args>⤶ <arg name="cornerRadius" type="number">Radius of the rounded corners, works best with a multiple of 2.</arg>⤶ <arg name="x" type="number">The x coordinate of the top left of the rectangle.</arg>⤶ <arg name="y" type="number">The y coordinate of the top left of the rectangle.</arg>⤶ <arg name="width" type="number">The width of the rectangle.</arg>⤶ <arg name="height" type="number">The height of the rectangle.</arg>⤶ <arg name="color" type="table">The color to fill the rectangle with. Uses the &lt;page&gt;Color&lt;/page&gt;.</arg>⤶ </args>⤶ </function>⤶ ⤶