未验证 提交 cf131f4e 编写于 作者: 葛亚芳 提交者: Gitee

update en/application-dev/reference/apis/js-apis-screenshot.md.

Signed-off-by: N葛亚芳 <geyafang@huawei.com>
上级 398954bd
......@@ -92,7 +92,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This API uses an async
console.log('Failed to save screenshot. Code: ' + JSON.stringify(err));
return;
}
console.log('Succeeded in saving sreenshot. Pixel bytes number: ' + pixelMap.getPixelBytesNumber());
console.log('Succeeded in saving screenshot. Pixel bytes number: ' + pixelMap.getPixelBytesNumber());
pixelMap.release(); // Release the memory in time after the PixelMap is used.
});
} catch (exception) {
......@@ -125,7 +125,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This API uses an async
console.log('Failed to save screenshot. Code: ' + JSON.stringify(err));
return;
}
console.log('Succeeded in saving sreenshot. Pixel bytes number: ' + pixelMap.getPixelBytesNumber());
console.log('Succeeded in saving screenshot. Pixel bytes number: ' + pixelMap.getPixelBytesNumber());
pixelMap.release(); // Release the memory in time after the PixelMap is used.
});
} catch (exception) {
......@@ -173,7 +173,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This API uses a promis
try {
let promise = screenshot.save(screenshotOptions);
promise.then((pixelMap) => {
console.log('Succeeded in saving sreenshot. Pixel bytes number: ' + pixelMap.getPixelBytesNumber());
console.log('Succeeded in saving screenshot. Pixel bytes number: ' + pixelMap.getPixelBytesNumber());
pixelMap.release(); // Release the memory in time after the PixelMap is used.
}).catch((err) => {
console.log('Failed to save screenshot. Code: ' + JSON.stringify(err));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册