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

!5409 翻译完成:5230 【轻量级 PR】:update zh-cn/application-dev/reference/apis/js-apis-screenshot.md:需同步翻译

Merge pull request !5409 from wusongqing/TR5230
# Screenshot # Screenshot
> **NOTE**<br/> > **NOTE**
>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import ## Modules to Import
...@@ -56,14 +57,14 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a cal ...@@ -56,14 +57,14 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a cal
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Required permissions**: ohos.permission.CAPTURE_SCREEN **Required permissions**: ohos.permission.CAPTURE_SCREEN (available only to system applications)
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| options | [ScreenshotOptions](#screenshotoptions) | No | Screenshot options, which consist of **screenRect**, **imageSize**, and **rotation**. You need to set these parameters.| | options | [ScreenshotOptions](#screenshotoptions) | No | Screenshot options, which consist of **screenRect**, **imageSize**, and **rotation**. You need to set these parameters.|
| callback | AsyncCallback&lt;image.PixelMap&gt; | Yes | Callback used to return a **PixelMap** object. | | callback | AsyncCallback&lt;image.PixelMap&gt; | Yes | Callback used to return a **PixelMap** object. |
**Example** **Example**
...@@ -96,7 +97,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro ...@@ -96,7 +97,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Required permissions**: ohos.permission.CAPTURE_SCREEN **Required permissions**: ohos.permission.CAPTURE_SCREEN (available only to system applications)
**Parameters** **Parameters**
...@@ -106,9 +107,9 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro ...@@ -106,9 +107,9 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------- | ----------------------------------------------- | | ----------------------------- | ----------------------------------------------- |
| Promise&lt;image.PixelMap&gt; | Promise used to return an **image.PixelMap** object.| | Promise&lt;image.PixelMap&gt; | Promise used to return an **image.PixelMap** object.|
**Example** **Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册