There was an error while loading. Please reload this page.
1 parent fbd45d4 commit 6d66ef1Copy full SHA for 6d66ef1
1 file changed
docs/reference/images/setRows.md
@@ -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