Skip to content

Commit 6d66ef1

Browse files
Create setRows.md
1 parent fbd45d4 commit 6d66ef1

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/reference/images/setRows.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Set Rows
2+
Sets rows using a buffer.
3+
``` sig
4+
image.create(null, null).setRows(null, null);
5+
```
6+
7+
## Parameters
8+
**x: ** the starting offset of the buffer
9+
**src:** The **raw data** of image.
10+
11+
## Example
12+
Fill the screen in dark blue.
13+
``` ts
14+
const buf = Buffer.create(160 * 120);
15+
const fillImg = image.create(160, 120);
16+
buf.fill(8);
17+
fillImg.setRows(0, buf);
18+
fillImg.drawImage(fillImg, 0, 0);
19+
````

0 commit comments

Comments
 (0)