GFX.LUA(8)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– 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 width width. 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 pixel fill, 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 of width. 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 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). 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 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). Text-cell image realness πŸ’–
🚨 Vibe check caveat: this table is optional and should only be used if it is non-nil and if core.isFramebufferConsole() is true. 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