natiny.render.rounded_rectangle_outline

Lua
natiny.render.rounded_rectangle_outline(x, y, w, h, radius_tl, radius_tr, radius_br, radius_bl [, thickness])

Draws the outline of a rectangle with each corner rounded by a radius of its own, on the currently bound render target, using the current drawing color set by natiny.render.set_color().

Radii are ordered top-left, top-right, bottom-right, bottom-left. All four are required; Lua makes only thickness optional.

Parameters

Name Type Default Description
x number Left edge X position
y number Top edge Y position
w number Width
h number Height
radius_tl number Top-left corner radius
radius_tr number Top-right corner radius
radius_br number Bottom-right corner radius
radius_bl number Bottom-left corner radius
thickness number 1.0 Outline thickness

Example

Lua
natiny.render.rounded_rectangle_outline(40, 40, 240, 140, 14, 14, 14, 14, 2)