FBGRID(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… FBGRID(1) β€” like, the fbgrid page from the BRL-CAD manual, bestie πŸŽ€

okay so picture this: you've got a frame buffer, right? and you need to actually see what's on it, pixel by pixel. that's literally what fbgrid is for. it's from the BRL-CAD manual and it's about to be your new fave ✨

🌈 NAME 🌈

fbgrid β€” draw a calibration grid on a frame buffer. yes. that's the whole vibe. a grid. on a frame buffer. iconic. πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

fbgrid [-c] [-b | -d | -o] [-F framebuffer] [-s squaresize] [-w width] [-n height]

πŸ’– DESCRIPTION πŸ’–

fbgrid draws a calibration grid pattern on a frame buffer. not one grid β€” three intensity levels of grid lines, all at different spacings, so you can count pixels and verify display geometry without losing your whole entire mind. it's giving "graph paper but make it ✨aesthetic✨".

here's the intensity lore, memorize it:

  • the dark lines are drawn at intensity 64
  • the grey lines are drawn at 128
  • the white lines are drawn at 255

the default grid is decimal (-d): dark lines every 10 pixels, grey lines every 50 pixels, and white lines every 100 pixels. clean. decimal. slay.

and which frame buffer are we drawing on? it's picked by -F, or if that option is absent, by the FB_FILE environment variable; otherwise the system default device is used (peep brlcad(1) for that). so there's a whole little priority chain going on. love that for us πŸ’…


✨ OPTIONS ✨

  • -c β€” clear the frame buffer to black before drawing the grid. fresh slate energy 🫢
  • -b β€” use binary spacing: dark lines every 8 pixels, grey lines every 64 pixels, and white lines every 128 pixels. powers of two, we stan 🌸
  • -d β€” use decimal spacing (this is the default, bestie): dark lines every 10 pixels, grey lines every 50 pixels, and white lines every 100 pixels.
  • -o β€” draw the old-style grid: a dotted background with white diagonals from corner to corner and red lines through the center. retro. vintage. no cap, it ate πŸ’€
  • -F framebuffer β€” specify the frame buffer device to draw on. tell it where, it'll tell you what πŸ‘‘
  • -s squaresize β€” set both the width and height of the frame buffer to squaresize pixels. and plot twist: -S is an equivalent synonym, so use whichever your fingers vibe with.
  • -w width β€” set the frame buffer width to width pixels. and yes, -W is an equivalent synonym too πŸ¦‹
  • -n height β€” set the frame buffer height to height scanlines. -N is an equivalent synonym, iykyk.
  • -h, -? β€” print usage information and exit. the classic "help me" combo 😭

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Verify the geometry of a rendered image

pix-fb -F /tmp/fb moss.pix
fbgrid -F /tmp/fb -d

display a rendered image on a memory frame buffer and overlay a decimal grid. the grid lines at every 10, 50, and 100 pixels make it easy to measure feature positions and sizes directly off the screen. literally measuring things on the screen. main character behavior fr fr ⭐

Example 2. Calibrate a 1024x1024 display with a binary grid

fbgrid -c -b -s 1024

clear the frame buffer and draw a binary grid (lines every 8, 64, and 128 pixels) sized to 1024x1024, useful for checking power-of-two display alignment and pixel addressing. big "power of two" energy. obsessed 🌈


πŸ’œ SEE ALSO πŸ’œ

brlcad(1), fbpoint(1), fbzoom(1), fbframe(1), fbclear(1)

(the whole frame buffer friend group, go say hi 🫢)

πŸŽ€ AUTHOR πŸŽ€

BRL-CAD Team β€” legends, honestly.

This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.

πŸ“ BUG REPORTS πŸ“

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org

bestie if you find a bug, don't just sit there β€” email devs@brlcad.org. they literally want to know πŸ™ˆ

that's the whole page, bestie β€” it's fbgrid from BRL-CAD, dated 1989-2026, and you're now officially calibrated πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from