GFX.LUA(8)
π NAME π
gfx.lua β bootloader graphics module. This is the GFX.LUA(8) page from the System Manager's Manual, bestie, and it's literally all about the bootloader graphics era π
.
β¨ DESCRIPTION β¨
okay so the built-in graphics-related Lua bindings for the FreeBSD boot loaders using the Lua interpreter? They're available via the gfx table. That's the whole vibe. π«Ά
πΈ Exported Functions πΈ
The following functions are exported in the loader table. Yes, loader table β the page said what it said, iykyk.
fb_bezier(x0, y0, x1, y1, x2, y2, width)β Draw a bezier curve through the points(x0, y0),(x1, y1), and(x2, y2)of widthwidth. The units are in pixels and have an origin of(0, 0). Art hour, no cap β¨fb_drawrect(x0, y0, x1, y1, fill)β Fill in a rectangle with the pixelfill, with the corners(x0, y0)and(x1, y1). The units are in pixels and have an origin of(0, 0). Rectangle slay πfb_line(x0, y0, x1, y1, width)β Draw a line from(x0, y0)to(x1, y1)with a width ofwidth. The units are in pixels and have an origin of(0, 0). Connect the dots, bestie πΈfb_putimage(name, x0, y0, x1, y1, f)β Load the PNG filenameand place it in the rectangle with the corners(x0, y0)and(x1, y1)and fill with pixelf. The units are in pixels and have an origin of(0, 0). PNG main character energy πΌοΈfb_set_pixel(x, y)β Sets the pixel at(x, y). The units are in pixels and have an origin of(0, 0). One pixel, one moment β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). Terminal rectangle moment π¦term_putimage(name, x0, y0, x1, y1, f)β Load the PNG filenameand place it in the rectangle with the text coordinate corners(x0, y0)and(x1, y1)and fill with pixelf. The units are in character cells and have an origin of(1, 1). Text-cell image realness π
π¨ Vibe check caveat: this table is optional and should only be used if it is non-niland ifcore.isFramebufferConsole()istrue. Do not skip the check, bestie β fr fr.
π¦ Compatibility π¦
All the interfaces described above are also available via the loader table through at last FreeBSD 15.0. (Quoted exactly, no cap β that's the page's lore.) π₯
π₯ SEE ALSO π₯
π AUTHORS π
The gfx.lua man page was written by Warner Losh <imp@FreeBSD.org>. Big slay to Warner, iconic behavior ππ
π
Source/version/date sign-off: Debian, GFX.LUA(8), March 29, 2025. Byeee, bestie ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2024 Netflix, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms