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

!4227 翻译完成:3998:Sample引用修改:无需翻译; API样板化:需同步翻译

Merge pull request !4227 from wusongqing/TR3998
# Display # Display
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > **NOTE**<br/>
> 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,7 +56,7 @@ getDefaultDisplay(callback: AsyncCallback&lt;Display&gt;): void ...@@ -56,7 +56,7 @@ getDefaultDisplay(callback: AsyncCallback&lt;Display&gt;): void
Obtains the default display object. Obtains the default display object.
**System capabilities**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
...@@ -82,7 +82,7 @@ getDefaultDisplay(): Promise&lt;Display&gt; ...@@ -82,7 +82,7 @@ getDefaultDisplay(): Promise&lt;Display&gt;
Obtains the default display object. Obtains the default display object.
**System capabilities**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Return value** **Return value**
...@@ -107,7 +107,7 @@ getAllDisplay(callback: AsyncCallback&lt;Array&lt;Display&gt;&gt;): void ...@@ -107,7 +107,7 @@ getAllDisplay(callback: AsyncCallback&lt;Array&lt;Display&gt;&gt;): void
Obtains all the display objects. Obtains all the display objects.
**System capabilities**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
...@@ -133,7 +133,7 @@ getAllDisplay(): Promise&lt;Array&lt;Display&gt;&gt; ...@@ -133,7 +133,7 @@ getAllDisplay(): Promise&lt;Array&lt;Display&gt;&gt;
Obtains all the display objects. Obtains all the display objects.
**System capabilities**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Return value** **Return value**
...@@ -158,7 +158,7 @@ on(type: 'add'|'remove'|'change', callback: Callback&lt;number&gt;): void ...@@ -158,7 +158,7 @@ on(type: 'add'|'remove'|'change', callback: Callback&lt;number&gt;): void
Enables listening. Enables listening.
**System capabilities**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
...@@ -182,7 +182,7 @@ off(type: 'add'|'remove'|'change', callback?: Callback&lt;number&gt;): void ...@@ -182,7 +182,7 @@ off(type: 'add'|'remove'|'change', callback?: Callback&lt;number&gt;): void
Disables listening. Disables listening.
**System capabilities**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
......
# Screenshot # Screenshot
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > **NOTE**<br/>
> 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
...@@ -54,7 +54,7 @@ save(options?: ScreenshotOptions, callback: AsyncCallback&lt;image.PixelMap&gt;) ...@@ -54,7 +54,7 @@ save(options?: ScreenshotOptions, callback: AsyncCallback&lt;image.PixelMap&gt;)
Takes a screenshot and saves it as a **PixelMap** object. This method uses a callback to return the result. Takes a screenshot and saves it as a **PixelMap** object. This method uses a callback to return the result.
**System capabilities**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Required permissions**: ohos.permission.CAPTURE_SCREEN **Required permissions**: ohos.permission.CAPTURE_SCREEN
...@@ -94,15 +94,15 @@ save(options?: ScreenshotOptions): Promise&lt;image.PixelMap&gt; ...@@ -94,15 +94,15 @@ save(options?: ScreenshotOptions): Promise&lt;image.PixelMap&gt;
Takes a screenshot and saves it as a **PixelMap** object. This method uses a promise to return the result. Takes a screenshot and saves it as a **PixelMap** object. This method uses a promise to return the result.
**System capabilities**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Required permissions**: ohos.permission.CAPTURE_SCREEN **Required permissions**: ohos.permission.CAPTURE_SCREEN
**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.|
**Return value** **Return value**
......
# webgl # webgl
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > **NOTE**<br/>
> 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.
...@@ -13,10 +13,10 @@ Create a **<canvas\>** component in the HML file. The following is an example: ...@@ -13,10 +13,10 @@ Create a **<canvas\>** component in the HML file. The following is an example:
``` ```
<div class="container">
<canvas ref="canvas1" style="width : 400px; height : 200px; background-color : lightyellow;"></canvas>
<button class="btn-button" onclick="BtnDraw2D">BtnDraw2D</button> <button class="btn-button" onclick="BtnDraw2D">BtnDraw2D</button>
</div>
``` ```
Obtain the **<canvas\>** component instance in the JS file. The following is an example: Obtain the **<canvas\>** component instance in the JS file. The following is an example:
......
# webgl2 # webgl2
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > **NOTE**<br/>
> 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.
...@@ -13,10 +13,10 @@ Create a **<canvas\>** component in the HML file. The following is an example: ...@@ -13,10 +13,10 @@ Create a **<canvas\>** component in the HML file. The following is an example:
``` ```
<div class="container">
<canvas ref="canvas1" style="width : 400px; height : 200px; background-color : lightyellow;"></canvas>
<button class="btn-button" onclick="BtnDraw2D">BtnDraw2D</button> <button class="btn-button" onclick="BtnDraw2D">BtnDraw2D</button>
</div>
``` ```
Obtain the **<canvas\>** component instance in the JS file. The following is an example: Obtain the **<canvas\>** component instance in the JS file. The following is an example:
......
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
The **Window** module provides basic capabilities for managing windows, including creating and destroying windows and setting serial port attributes. The **Window** module provides basic capabilities for managing windows, including creating and destroying windows and setting serial port attributes.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > **NOTE**<br/>
> The initial APIs of this module are supported since API version 6. 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 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
## Modules to Import ## Modules to Import
...@@ -96,7 +95,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -96,7 +95,7 @@ This is a system API and cannot be called by third-party applications.
## Rect<sup>7+</sup> ## Rect<sup>7+</sup>
Describes a rectangle. Describes the rectangular area of the window.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
...@@ -371,6 +370,8 @@ getTopWindow(callback: AsyncCallback&lt;Window&gt;): void ...@@ -371,6 +370,8 @@ getTopWindow(callback: AsyncCallback&lt;Window&gt;): void
Obtains the top window of the current application. This API uses an asynchronous callback to return the result. Obtains the top window of the current application. This API uses an asynchronous callback to return the result.
This API is discarded since API version 8. You are advised to use [window.getTopWindow<sup>8+</sup>](#windowgettopwindow8) instead.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
...@@ -399,6 +400,8 @@ getTopWindow(): Promise&lt;Window&gt; ...@@ -399,6 +400,8 @@ getTopWindow(): Promise&lt;Window&gt;
Obtains the top window of the current application. This API uses a promise to return the result. Obtains the top window of the current application. This API uses a promise to return the result.
This API is discarded since API version 8. You are advised to use [window.getTopWindow<sup>8+</sup>](#windowgettopwindow8) instead.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Return value** **Return value**
...@@ -2393,7 +2396,7 @@ loadContent(path: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -2393,7 +2396,7 @@ loadContent(path: string, callback: AsyncCallback&lt;void&gt;): void
Loads content to this window stage. This API uses an asynchronous callback to return the result. Loads content to this window stage. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.WindowManager.WindowManager.Coretype with the value 'windowSizeChange' **System capability**: SystemCapability.WindowManager.WindowManager.Coretype with the value **windowSizeChange**
**Parameters** **Parameters**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册