LuaBox
Loading...
Searching...
No Matches
DisplayRect.h File Reference
#include "lua_include.h"
#include "global.h"

Go to the source code of this file.

Functions

int DisplayRect (lua_State *L_)
 Draws a rectangle (optionally with rounded corners) on the sprite buffer.

Function Documentation

◆ DisplayRect()

int DisplayRect ( lua_State * L_)

Draws a rectangle (optionally with rounded corners) on the sprite buffer.

This function draws the outline of a rectangle on the sprite buffer using the specified coordinates and color. An optional rounding radius can be provided for rounded corners.

Parameters
L_Lua state; expects arguments in order: 1: x1 (X coordinate of top-left corner) 2: y1 (Y coordinate of top-left corner) 3: x2 (X coordinate of bottom-right corner) 4: y2 (Y coordinate of bottom-right corner) 5: color (16-bit RGB565 color) 6: radius (optional, rounding radius; default 0)
Returns
int Returns 0; no values are pushed to the Lua stack.
Note
Uses 16-bit RGB565 color format for the sprite buffer.