FBLINE(1)

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

πŸ’… FBLINE(1) β€” the fbline page from the BRL-CAD manual, bestie

okay so you opened the FBLINE(1) page, welcome, this is genuinely one of the cutest little tools in the whole BRL-CAD set. it draws a line. that's it. that's the whole personality. and honestly? iconic.

✨ NAME ✨

fbline β€” draw a colored line on a framebuffer πŸŽ€

🌸 SYNOPSIS 🌸

fbline [-c] [-F framebuffer] [-s squaresize] [-w width] [-n height]
       [-r red] [-g green] [-b blue] x1 y1 x2 y2

πŸ’– DESCRIPTION πŸ’–

so fbline draws a single line on the currently selected framebuffer, going from the point (x1, y1) to the point (x2, y2), and it uses a Bresenham line algorithm to do it. yes, the classic. no cap, it's the good one. ✨

if an endpoint falls outside the framebuffer, it gets clamped to the screen edges β€” like, gently. no crashing, no drama, it just slides on in. 😌

coordinates are given in framebuffer pixels, and the origin sits at the lower-left corner. so up is up. πŸ¦‹

the environment variable FB_FILE tells it which framebuffer to use β€” peep brlcad(1) for the lore on that. or you can just name the framebuffer explicitly with the -F option, main character behavior honestly. πŸ’…

by default the requested framebuffer size is 512x512 pixels and the line color is white (255, 255, 255). plain. clean. a little minimalist moment.

pro tip from me to you: use fbpoint(1) to interactively figure out your endpoint coordinates. she's literally built for that. 🫢

πŸ‘‘ OPTIONS πŸ‘‘

  • -c β€” clear the framebuffer before drawing. by default the line is drawn over the existing image, so only pass this if you want a fresh slate, bestie. 🧚
  • *-F *framebuffer β€” explicitly specify the framebuffer device. naming your device directly is very demure, very mindful.
  • -s squaresize β€” set *both the width and height of the framebuffer to *squaresize pixels. one number, both dimensions, efficiency queen. also available as -S.
  • *-w *width β€” set the framebuffer width in pixels. also available as -W.
  • *-n *height β€” set the framebuffer height in pixels. also available as -N.
  • *-r *red β€” red component [0..255] of the line color (default 255). πŸ”₯
  • *-g *green β€” green component [0..255] of the line color (default 255). πŸ“
  • *-b *blue β€” blue component [0..255] of the line color (default 255). πŸ¦‹
  • -h β€” print a usage message and exit. also available as -?. sometimes you just gotta ask. 😭

🌈 EXAMPLES 🌈

Example 1. Draw crosshairs over an image on the framebuffer

pix-fb -s 512 image.pix
fbline -r 255 -g 0 -b 0 256 0 256 511
fbline -r 255 -g 0 -b 0 0 256 511 256

okay so here's the vibe: first you display a 512x512 image with pix-fb(1), then you overlay a red vertical line and a red horizontal line straight through the center to mark the image center. crosshair moment. 🎯

and the reason this works so slay is that fbline draws over the existing image without clearing it, so successive invocations just accumulate on the same framebuffer. they stack. they layer. they serve. πŸ’…βœ¨


πŸ’œ SEE ALSO πŸ’œ

brlcad(1), fblabel(1), fbpoint(1), pix-fb(1), plot3-fb(1), libfb(3), pix(5)

go read them, they're all in the friend group. 🫢

πŸŽ€ AUTHOR πŸŽ€

BRL-CAD Team πŸ‘‘

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


okay bestie that's the whole page!! πŸ’– this was the BRL-CAD manual's FBLINE(1) entry, and the paperwork on it runs from 1989 all the way to 2026 β€” a real long-term relationship. now go draw a line, you're gonna ate. πŸ¦‹βœ¨πŸ’…

πŸ“¦ where this page comes from