FBLINE(1)
π
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. -ssquaresizeβ set *both the width and height of the framebuffer to *squaresizepixels. 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 (default255). π₯ - *
-g*greenβ green component[0..255]of the line color (default255). π - *
-b*blueβ blue component[0..255]of the line color (default255). π¦ -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 π
β COPYRIGHT β
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
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms