GFX.LUA(8)

NAME
gfx.lua - bootloader graphics module

DESCRIPTION
The built-in graphics related Lua bindings for the FreeBSD boot loaders using the Lua interpreter are available via the gfx table.

  Exported Functions
The following functions are exported in the loader table.

fb_bezier(x0, y0, x1, y1, x2, y2, width)
    Draw a bezier curve through the points (x0, y0), (x1, y1), and (x2, y2) of width width. The units are in pixels and have an origin of (0, 0).

fb_drawrect(x0, y0, x1, y1, fill)
    Fill in a rectangle with the pixel fill with the corners (x0, y0) and (x1, y1). The units are in pixels and have an origin of (0, 0).

fb_line(x0, y0, x1, y1, width)
    Draw a line from (x0, y0) to (x1, y1) with a width of width. The units are in pixels and have an origin of (0, 0).

fb_putimage(name, x0, y0, x1, y1, f)
    Load the PNG file name and place it in the rectangle with the corners (x0, y0) and (x1, y1) and fill with pixel f. The units are in pixels and have an origin of (0, 0).

fb_set_pixel(x, y)
    Sets the pixel at (x, y). The units are in pixels and have an origin of (0, 0).

term_drawrect(x0, y0, x1, y1)
    Draw the outline of a rectangle with the text coordinate corners of (x0, y0) and (x1, y1). The units are in character cells and have an origin of (1, 1).

term_putimage(name, x0, y0, x1, y1, f)
    Load the PNG file name and place it in the rectangle with the text coordinate corners (x0, y0) and (x1, y1) and fill with pixel f. The units are in character cells and have an origin of (1, 1).

This table is optional and should only be used if it is non-nil and if core.isFramebufferConsole() is true.

  Compatibility
All the interfaces described above are also available via the loader table through at last FreeBSD 15.0.

SEE ALSO
loader.conf(5), core.lua(8), loader(8), loader.lua(8)

AUTHORS
The gfx.lua man page was written by Warner Losh <imp@FreeBSD.org>.