(
lines: Array<{ left: number; top: number; text: string; fg: ColorInput; bg?: ColorInput; attrs?: number }>,
row: string,
input: {
left: number
top: number
fg: ColorInput
shadow: ColorInput
attrs?: number
},
)
| 142 | } |
| 143 | |
| 144 | function draw( |
| 145 | lines: Array<{ left: number; top: number; text: string; fg: ColorInput; bg?: ColorInput; attrs?: number }>, |
| 146 | row: string, |
| 147 | input: { |
| 148 | left: number |
| 149 | top: number |
| 150 | fg: ColorInput |
| 151 | shadow: ColorInput |
| 152 | attrs?: number |
| 153 | }, |
| 154 | ) { |
| 155 | let x = input.left |
| 156 | for (const cell of cells(row)) { |
| 157 | if (cell.mark === "full" || cell.mark === "mix") { |
| 158 | push(lines, x, input.top, cell.char, input.fg, input.shadow, input.attrs) |
| 159 | x += 1 |
| 160 | continue |
| 161 | } |
| 162 | |
| 163 | if (cell.mark === "top") { |
| 164 | push(lines, x, input.top, cell.char, input.shadow, undefined, input.attrs) |
| 165 | x += 1 |
| 166 | continue |
| 167 | } |
| 168 | |
| 169 | push(lines, x, input.top, cell.char, input.fg, undefined, input.attrs) |
| 170 | x += 1 |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | function build(input: SplashWriterInput, kind: "entry" | "exit", ctx: ScrollbackRenderContext): ScrollbackSnapshot { |
| 175 | const width = Math.max(1, ctx.width) |
no test coverage detected