提交 0f600fe5 编写于 作者: G Gloria

Update docs against 9564+9653

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 11a50470
...@@ -170,7 +170,12 @@ Reads image pixel map data in an area. This API uses a promise to return the dat ...@@ -170,7 +170,12 @@ Reads image pixel map data in an area. This API uses a promise to return the dat
**Example** **Example**
```js ```js
const area = new ArrayBuffer(400); const area = {
pixels: new ArrayBuffer(8),
offset: 0,
stride: 8,
region: { size: { height: 1, width: 2 }, x: 0, y: 0 }
}
pixelmap.readPixels(area).then(() => { pixelmap.readPixels(area).then(() => {
console.log('Succeeded in reading the image data in the area.'); // Called if the condition is met. console.log('Succeeded in reading the image data in the area.'); // Called if the condition is met.
}).catch(error => { }).catch(error => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册