Documentation
¶
Overview ¶
Package paint makes a rendered frame opaque.
Rex shows the terminal underneath a floating layer through every cell left on the default background. lipgloss leaves such cells wherever a styled span ends (its SGR reset clears the background), in padding, and in the rest of a line, so a frame built from perfectly themed components still has holes. Fill closes them after the fact; Holes counts what is left.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fill ¶
Fill returns frame with bg set on every cell that has no background of its own. Cells that already carry a background keep it, so wells and accent bars survive. The result is rectangular: a short line is padded to the widest line's width with bg-coloured cells.
On a 16-colour (or poorer) profile Fill returns frame unchanged: bg would be rounded to the nearest of 16 colours, usually black, which makes a worse slab than the see-through cells it replaces. This matches forge's solidCard.
func Holes ¶
Holes counts the cells of frame, laid out on a w×h canvas, that have no background. It counts on the canvas and never on a re-parsed string: Canvas.Render trims trailing spaces, so a right-padded line would read as shorter than it is. Cells outside the frame but inside w×h count as holes, which is the point when asserting a frame covers its whole layer.
Types ¶
This section is empty.