Skip to content

Commit 98bd323

Browse files
committed
update cell mode docs
1 parent 6e02479 commit 98bd323

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

content/runal.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function setup(c) {
166166
// just to get a more balenced output.
167167
// A terminal cell is not a square, so the result can feel
168168
// squished a little bit.
169-
c.cellPaddingDouble();
169+
c.cellModeDouble();
170170
}
171171
172172
function draw(c) {
@@ -285,14 +285,16 @@ Drawing in the terminal is a little bit weird, because each cell is not a square
285285
One simple way to fix this problem is to **use 2 cells instead of one** for drawing one canvas pixel, but the question is : which character to draw in the second cell?
286286

287287
You can control this behavior with 2 methods:
288-
- **c.cellPadding(char)**: it allows you to define which character to use in the second cell. One obvious option is to use a black space, but other choice may give you fun results.
289-
- **c.cellPaddingDouble()**: it just duplicates the first character.
288+
- **c.cellModeCustom(char)**: it allows you to define which character to use in the second cell. One obvious option is to use a black space, but other choice may give you fun results.
289+
- **c.cellModeDouble()**: it just duplicates the first character.
290290

291+
#### c.cellModeDefault() <sub>since v0.9.0</sub>
292+
Makes every cell a single character. This is the default behavior.
291293

292-
#### c.cellPadding(char)
294+
#### c.cellModeCustom(char) <sub>since v0.9.0</sub>
293295
Sets a character used for cell spacing between elements.
294296

295-
#### c.cellPaddingDouble()
297+
#### c.cellModeDouble() <sub>since v0.9.0</sub>
296298
Makes every cell duplicated.
297299

298300
#### c.clear()

0 commit comments

Comments
 (0)