update README

Signed-off-by: libenyao <libenyao@h-partners.com>
This commit is contained in:
libenyao
2023-03-14 16:40:34 +08:00
parent e90a6fe9ee
commit cbddfef04c
2 changed files with 17 additions and 20 deletions
+4 -9
View File
@@ -1,11 +1,6 @@
# Previewer<a name="ZH-CN_TOPIC_0000001076213355"></a>
- [Introduction](#section15701932113019)
- [Directory Structure](#section1791423143211)
- [Usage Scenarios](#section171384529150)
- [Repositories Involved](#section1447164910172)
## Introduction<a name="section15701932113019"></a>
## Introduction
The Previewer is a component that empowers the DevEco Studio Previewer to leverage the ArkUI rendering engine for real-time rendering and preview. To be specific, with the Previewer component, the DevEco Studio Previewer can instruct the ArkUI rendering engine through commands to implement real-time rendering and receive the resultant images for preview presentation. The Previewer component supports ArkTS and JS applications on Windows or macOS.
@@ -14,7 +9,7 @@ The Previewer is a component that empowers the DevEco Studio Previewer to levera
![](figures/Previewer-Component-Architecture.PNG "Previewer Component Architecture")
To start with, the DevEco Studio Previewer launches the Previewer component through the command line and passes to it startup parameters such as the ArkTS build product path and preview specifications. When starting up, the Previewer component launches the ArkUI rendering engine, which then renders pages based on the startup parameters and delivers preview images for the DevEco Studio Previewer. When page information changes, the DevEco Studio Previewer sends page refresh commands through the command pipe to the Previewer component. According to the received commands, the Previewer component calls the ArkUI processing APIs to refresh and render the pages and deliver the images.
## Directory Structure<a name="section1791423143211"></a>
## Directory Structure
The source code of the Previewer component is stored in **/tools_previewer**. The following shows the directory structure.
@@ -27,11 +22,11 @@ The source code of the Previewer component is stored in **/tools_previewer**. Th
├── util # Utility
```
## Usage Scenarios<a name="section171384529150"></a>
## Usage Scenarios
The Previewer component is built and released with the OpenHarmony SDK to provide the DevEco Studio Previewer with the capability of invoking the ArkUI to render pages.
## Repositories Involved<a name="section1447164910172"></a>
## Repositories Involved
**tools_previewer**
+13 -11
View File
@@ -1,19 +1,14 @@
# 预览器组件<a name="ZH-CN_TOPIC_0000001076213355"></a>
- [简介](#section15701932113019)
- [目录](#section1791423143211)
- [使用场景](#section171384529150)
- [相关仓](#section1447164910172)
## 简介
## 简介<a name="section15701932113019"></a>
预览器组件为DevEco Studio预览器提供了启动ArkUI渲染引擎的能力,使其能够通过命令管道操控ArkUI渲染引擎做到实时渲染,并将处理好的图片发送到DevEco Studio预览器中展示。预览器组件支持在Windows、MacOS上运行ArkTS及JS应用。
预览器组件为DevEco Studio预览器提供了启动ArkUI渲染引擎的能力,使预览器能够通过命名管道的通信方式发送命令给预览器组件,操控ArkUI渲染引擎做到实时渲染,并将处理好的图片发送到DevEco Studio预览器中展示。预览器组件支持在Windows、MacOS上运行ArkTS及JS应用。
**图 1** 预览器组件架构<a name="fig2606133765017"></a>
![](figures/预览器组件架构图.PNG "预览器组件架构")
DevEco Studio预览器通过命令行启动预览器组件,传递ArkTS编译产物路径及预览规格等参数数据,预览器组件启动时拉起ArkUI渲染引擎,根据启动参数渲染页面并输出图片给DevEco Studio预览器前端。DevEco Studio预览器通过命管道发送命令给预览器组件处理页面动态变更信息,预览器组件根据不同命令调用ArkUI处理接口刷新渲染页面输出图片。
## 目录<a name="section1791423143211"></a>
DevEco Studio预览器通过命令行启动预览器组件,传递ArkTS编译产物路径及预览规格等参数数据,预览器组件启动时拉起ArkUI渲染引擎,根据启动参数渲染页面并输出图片给DevEco Studio预览器前端。DevEco Studio预览器通过命管道发送命令给预览器组件处理页面动态变更信息,预览器组件根据不同命令调用ArkUI处理接口刷新渲染页面输出图片。
## 目录
预览器组件源代码在/tools_previewer下,目录结构如下图所示:
@@ -26,11 +21,15 @@ DevEco Studio预览器通过命令行启动预览器组件,传递ArkTS编译
├── util # 工具类
```
## 使用场景<a name="section171384529150"></a>
## 使用场景
预览器组件随OpenHarmony SDK一起编译和发布,为DevEco Studio预览器提供调用ArkUI渲染页面的能力。
## 相关仓<a name="section1447164910172"></a>
## 构建编译
构建编译相关介绍请见[build](https://gitee.com/openharmony/build)仓的README文档。
## 相关仓
**tools_previewer**
@@ -38,3 +37,6 @@ DevEco Studio预览器通过命令行启动预览器组件,传递ArkTS编译
[arkui\_ace\_engine](https://gitee.com/openharmony/arkui_ace_engine)
## 贡献
详情请参考[贡献指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/Readme-CN.md)。