Skip to content

Commit 2f9796c

Browse files
author
Xavier Godart
committed
update runal image doc
1 parent a254ca0 commit 2f9796c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

content/runal.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,17 @@ let entireCanvas = c.get(0, 0, c.width, c.height);
302302
let square = c.get(2, 2, 3, 3);
303303
```
304304

305-
#### c.set(x, y, img) <sub>since v0.6.0</sub>
306-
Draws an [image](#image-since-v0-6-0) to the canvas at (x, y).
305+
#### c.set(x, y, cells) <sub>since v0.6.0</sub>
306+
Draws an [image](#image-since-v0-6-0) or a [cell](#cell-since-v0-6-0) to the canvas at (x, y).
307307

308308
```js
309309
// Duplicate the first half of the canvas.
310310
let half = c.get(0, 0, c.width/2, c.height);
311311
c.set(c.width/2, 0, half);
312+
313+
// Duplicate a single cell
314+
let single = c.get(0, 0, 1, 1);
315+
c.set(1, 0, single.cell(0, 0));
312316
```
313317

314318

0 commit comments

Comments
 (0)