未验证 提交 a49b6d8c 编写于 作者: O openharmony_ci 提交者: Gitee

!9653 modify the example of readPixels

Merge pull request !9653 from 徐蕊w/master
......@@ -169,7 +169,12 @@ readPixels(area: PositionArea): Promise\<void>
**示例:**
```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(() => {
console.log('Succeeded in reading the image data in the area.'); //符合条件则进入
}).catch(error => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册