Function
fillBackground
(px: Uint8Array, bg: AnsiColor)
Source from the content-addressed store, hash-verified
| 160 | } |
| 161 | |
| 162 | function fillBackground(px: Uint8Array, bg: AnsiColor): void { |
| 163 | for (let i = 0; i < px.length; i += 4) { |
| 164 | px[i] = bg.r |
| 165 | px[i + 1] = bg.g |
| 166 | px[i + 2] = bg.b |
| 167 | px[i + 3] = 255 |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | // Modern terminals render shade chars (░▒▓█) as solid blocks with opacity, |
| 172 | // not the classic VGA dither pattern. Alpha-blend toward background for the |
Tested by
no test coverage detected