> home > Custom Layer Boundary API

draw_rectangle

September 8th 2024
Directly render a rectangle

Signature

C++
void
draw_rectangle(Application_Links* app,
               Rect_f32 rect,
               f32 roundness,
               ARGB_Color color);

Parameters

app

the standard custom layer context pointer

rect

the rectangle coordinates, in pixels relative to the top left corner of the screen

roundness

the roundness of the pixels, set as a radius of a circular curve measured in pixels

color

the color of the rectangle

Details

As a render function, this only takes effect during a call to the render hook.