diff --git a/en/react-native-svg-capi.md b/en/react-native-svg-capi.md
index 047dcd7c5cde195deb597d44c728f48bcb61f307..6c8f468320c785efdf3b674edfaef76396a71d32 100644
--- a/en/react-native-svg-capi.md
+++ b/en/react-native-svg-capi.md
@@ -1,34 +1,24 @@
-> Template version: v0.2.2
+Template version: v0.4.0
react-native-svg(CAPI)
-
-
-
-
-
-
-
-
-
-> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-harmony-svg)
-## Installation and Usage
+This project is based on [react-native-svg](https://github.com/software-mansion/react-native-svg) .
-Please refer to the Releases page of the third-party library for the corresponding version information:
+This third-party library has been migrated to Gitcode and is now available for direct download from npm, the new package name is: `@react-native-ohos/react-native-svg`, The version correspondence details are as follows:
-| Third-party Library Version | Release Information | Supported RN Version |
-| ---------- | ------------------------------------------------------------ | ---------- |
-| <= 15.0.1@deprecated | [@react-native-oh-tpl/react-native-svg Releases(deprecated)](https://github.com/react-native-oh-library/react-native-harmony-svg/releases) | 0.72 |
-| 15.0.2 | [@react-native-ohos/react-native-svg Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.72 |
-| 15.12.1 | [@react-native-ohos/react-native-svg Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.77 |
+| Name | Version | Release Information | Supported RN Version | Supported Autolink | Compile API Version | Community Baseline Version | npm Address |
+| ------------------------------------- | -------------------- | ------------------------------------------------------------ | -------------------- | ------------------ | ------------------- | -------------------------- | ------------------------------------------------------------ |
+| @react-native-ohos/react-native-svg | ~15.13.0 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.82.* | No | API15+ | 15.15.0 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-svg) |
+| @react-native-ohos/react-native-svg | ~15.12.1 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.77.* | No | API15+ | 15.12.0 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-svg) |
+| @react-native-ohos/react-native-svg | ~ 15.0.2 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.72.* | Yes | API15+ | 15.0.0 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-svg) |
+| @react-native-oh-tpl/react-native-svg | <= 15.0.1@deprecated | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-harmony-svg/releases) | 0.72.* | No | API12+ | 15.0.0 | [Npm Address](https://www.npmjs.com/package/@react-native-oh-tpl/react-native-svg) |
-For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
+## 1. Installation and Usage
Go to the project directory and execute the following instruction:
-
#### **npm**
@@ -41,6 +31,10 @@ npm install @react-native-ohos/react-native-svg
# 0.77
npm install react-native-svg@15.12.0
npm install @react-native-ohos/react-native-svg
+
+# 0.82
+npm install react-native-svg@15.15.0
+npm install @react-native-ohos/react-native-svg
```
#### **yarn**
@@ -53,6 +47,10 @@ yarn add @react-native-ohos/react-native-svg
# 0.77
yarn add react-native-svg@15.12.0
yarn add @react-native-ohos/react-native-svg
+
+# 0.82
+yarn add react-native-svg@15.15.0
+yarn add @react-native-ohos/react-native-svg
```
@@ -62,9 +60,9 @@ The following code shows the basic use scenario of the repository:
> [!WARNING] The name of the imported repository remains unchanged.
```js
-import React from "react";
-import { StyleSheet, SafeAreaView } from "react-native";
-import { Svg, Path } from "react-native-svg";
+import React from 'react';
+import { StyleSheet,SafeAreaView } from 'react-native';
+import { Svg,Path } from 'react-native-svg';
export default function App() {
return (
@@ -78,43 +76,54 @@ export default function App() {
const styles = StyleSheet.create({
container: {
- flex: 1,
- backgroundColor: "grey",
+ flex:1,
+ backgroundColor: 'grey',
},
});
```
-## Link
+## 2. Manual Link
| | Is supported autolink | Supported RN Version |
|--------------------------------------|-----------------------|----------------------|
+| ~15.15.0 | No | 0.82 |
| ~15.12.1 | No | 0.77 |
| ~15.0.2 | Yes | 0.72 |
| <= 15.0.1@deprecated | No | 0.72 |
-Using AutoLink need to be configured according to this document, Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md
+Projects using AutoLink need to be configured according to this document, AutoLink framework guide.:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md
+
+If the version you are using supports Autolink and the project has integrated Autolink, you can skip the ManualLink configuration.
-If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration.
- ManualLink: this step is a guide to manually configure native dependencies.
+ ManualLink: This step provides guidance for manually configuring native dependencies.
+
+
+Open the `harmony` directory of the HarmonyOS project in DevEco Studio.
+
+### 2.1 Overrides RN SDK
-First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory.
+To ensure the project relies on the same version of the RN SDK, you need to add an `overrides` field in the project's root `oh-package.json5` file, specifying the RN SDK version to be used. The replacement version can be a specific version number, a semver range, or a locally available HAR package or source directory.
-### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project
+For more information about the purpose of this field, please refer to the [official documentation](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/ide-oh-package-json5-V5#en-us_topic_0000001792256137_overrides).
```json
{
- ...
"overrides": {
- "@rnoh/react-native-openharmony" : "./react_native_openharmony"
+ "@rnoh/react-native-openharmony": "^0.72.38" // ohpm version
+ // "@rnoh/react-native-openharmony" : "./react_native_openharmony.har" // a locally available HAR package
+ // "@rnoh/react-native-openharmony" : "./react_native_openharmony" // source code directory
}
}
```
-### 2. Introducing Native Code
+### 2.2 Introducing Native Code
Currently, two methods are available:
+- Use the HAR file.
+- Directly link to the source code。
+
Method 1 (recommended): Use the HAR file.
> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library.
@@ -123,8 +132,7 @@ Open `entry/oh-package.json5` file and add the following dependencies:
```json
"dependencies": {
- "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-ohos/react-native-svg": "file:../../node_modules/@react-native-ohos/react-native-svg/harmony/svg.har"
+ "@react-native-ohos/Package_Name": "file:../../node_modules/@react-native-ohos/react-native-svg/harmony/svg.har"
}
```
@@ -141,46 +149,22 @@ Method 2: Directly link to the source code.
> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md).
-### 3. Configuring CMakeLists and Introducing SVGPackage
+### 2.3 Configuring CMakeLists and Introducing Svg Package
> If you are using version <= 15.0.1, please skip this chapter.
Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
```diff
-project(rnapp)
-cmake_minimum_required(VERSION 3.4.1)
-set(CMAKE_SKIP_BUILD_RPATH TRUE)
-set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
+ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
-set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
-set(LOG_VERBOSITY_LEVEL 1)
-set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
-set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
-set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
-add_compile_definitions(WITH_HITRACE_SYSTRACE)
-
-add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
-add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-svg/src/main/cpp" ./svg)
# RNOH_END: manual_package_linking_1
-file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
-
-add_library(rnoh_app SHARED
- ${GENERATED_CPP_FILES}
- "./PackageProvider.cpp"
- "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
-)
-target_link_libraries(rnoh_app PUBLIC rnoh)
-
# RNOH_BEGIN: manual_package_linking_2
-target_link_libraries(rnoh_app PUBLIC rnoh_sample_package)
+ target_link_libraries(rnoh_app PUBLIC rnoh_svg)
-# RNOH_END: link_packages
+# RNOH_END: manual_package_linking_2
```
Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code:
@@ -188,7 +172,6 @@ Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code:
```diff
#include "RNOH/PackageProvider.h"
#include "generated/RNOHGeneratedPackage.h"
-#include "SamplePackage.h"
+ #include "SVGPackage.h"
using namespace rnoh;
@@ -196,13 +179,12 @@ using namespace rnoh;
std::vector> PackageProvider::getPackages(Package::Context ctx) {
return {
std::make_shared(ctx),
- std::make_shared(ctx),
+ std::make_shared(ctx),
};
}
```
-### 4. Introducing SvgPackage to ArkTS
+### 2.4. Introducing SvgPackage to ArkTS
Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
@@ -212,14 +194,13 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
- new SamplePackage(ctx),
+ new SvgPackage(ctx),
];
}
```
-## Running
+## 2.5 Running
Click the `sync` button in the upper right corner.
@@ -236,7 +217,6 @@ Then build and run the code.
> [!TIP] This item is not mandatory. It only needs to be configured when using the fontFamily Properties property in the Text to specify a custom font.
-
Step 1:
Copy the font files to the entry/src/main/resources/rawfile/assets/fonts directory (if external font files are used, you need to copy the *.ttf files over).
@@ -249,7 +229,7 @@ Open `entry/src/main/ets/pages/Index.ets` and add the following code:
"HarmonyOS_Sans_Condensed_Regular_Italic": $rawfile("assets/fonts/HarmonyOS_Sans_Condensed_Regular_Italic.ttf")
"HarmonyOS_Sans_Digit_Medium": $rawfile("assets/fonts/HarmonyOS_Sans_Digit_Medium.ttf")
}
-
+
@Entry
@Component
struct Index {
@@ -257,7 +237,7 @@ Open `entry/src/main/ets/pages/Index.ets` and add the following code:
build() {
Column(){
//...
-
+
RNApp({
rnInstanceConfig: {
//...
@@ -265,14 +245,14 @@ Open `entry/src/main/ets/pages/Index.ets` and add the following code:
},
//...
}
-
+
}
//...
}
-## Constraints
+## 3. Constraints
-### Compatibility
+### 3.1 Compatibility
To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone.
@@ -281,421 +261,470 @@ Verified in the following versions.
1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112;
2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71;
3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112;
+4. RNOH: 0.82.1; SDK: HarmonyOS 6.0.1 Release SDK; IDE: DevEco Studio 6.0.1 Release; ROM: 6.0.0.120 SP7;
+
+### 3.2. API requirements
+
+> [!TIP] All versions of the current third-party libraries have implemented version isolation, supporting compilation in `API12+` projects and execution on `API12+` ROMs.
+> [!TIP] The following features depend on specific API versions. Compiling the project with an API version lower than specified or running the ROM with an API version lower than specified may result in limited functionality.
+
+1. Version >=15.0.2 for 0.72 introduced [OH_ArkUI_CreateSnapshotOptions](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/capi-native-type-h#oh_arkui_createsnapshotoptions),[OH_ArkUI_SnapshotOptions_SetScale](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/capi-native-type-h#oh_arkui_snapshotoptions_setscale),[OH_ArkUI_GetNodeSnapshot](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/capi-native-node-h#oh_arkui_getnodesnapshot), achieves the ForeignObject functionality . This API requires compilation in a project that supports `API15+` and must run on a ROM that supports `API15+` to take effect.
+2. Version >=15.12.1 for 0.77 introduced [OH_ArkUI_CreateSnapshotOptions](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/capi-native-type-h#oh_arkui_createsnapshotoptions),[OH_ArkUI_SnapshotOptions_SetScale](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/capi-native-type-h#oh_arkui_snapshotoptions_setscale),[OH_ArkUI_GetNodeSnapshot](https://developer.huawei.com/consumer/cn/doc/harmonyos-references/capi-native-node-h#oh_arkui_getnodesnapshot), achieves the ForeignObject functionality . This API requires compilation in a project that supports `API15+` and must run on a ROM that supports `API15+` to take effect.
## Properties
For details, see [react-native-svg](https://github.com/software-mansion/react-native-svg/blob/main/USAGE.md)
-以下为目前已支持的组件 Properties:
+The following are the currently supported component properties:
> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library.
> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android.
-**Svg**:绘制组件的父组件
+**Svg**: Parent component for drawing components
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-----------------: | :------------------: | :-------------: | :------: | :------: | :---------------: |
-| width | 组件宽度 | number\| string | Yes | All | Yes |
-| height | 组件高度 | number\| string | Yes | All | Yes |
-| viewBox | 组件视区 | string | No | All | Yes |
-| color | 颜色 | string | No | All | Yes |
-| title | 组件标题名 | string | No | All | Yes |
-| preserveAspectRatio | 是否强制进行统一缩放 | string | No | All | Yes |
-| style | 用于控制组件的视觉外观和布局 |object | No | All | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :-----------------: | :--------------------------------------------------------: | :-------------: | :------- | :------- | :---------------- |
+| width | Component width | number\| string | Yes | All | Yes |
+| height | Component height | number\| string | Yes | All | Yes |
+| viewBox | Component viewport | string | No | All | Yes |
+| color | Color | string | No | All | Yes |
+| title | Component title name | string | No | All | Yes |
+| preserveAspectRatio | Whether to force unified scaling | string | No | All | Yes |
+| style | Controls the visual appearance and layout of the component | object | No | All | Yes |
-**G**:该元素是用于对 Others SVG 元素进行分组的容器
+**G**: A container used to group other SVG elements
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| :-----: | :---------: | :-------------: | -------- | -------- | ----------------- |
-| opacity | 透明度 | number\| string | No | All | Yes |
+| opacity | Opacity | number\| string | No | All | Yes |
-**Path**: 路径绘制组件,根据绘制路径生成封闭的自定义形状
+**Path**: Path drawing component that generates closed custom shapes based on the drawing path
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-----: | :------------------: | :----: | -------- | -------- | ----------------- |
-| d | 路径绘制的命令字符串 | string | Yes | All | Yes |
-| opacity | 透明度 | number | No | All | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :-----: | :-----------------------------: | :----: | -------- | -------- | ----------------- |
+| d | Command string for path drawing | string | Yes | All | Yes |
+| opacity | Opacity | number | No | All | Yes |
-**Rect**: 矩形绘制组件,根据角位置和宽高生成矩形形状
+**Rect**: Rectangle drawing component that generates rectangular shapes based on corner positions, width and height
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-----: | :---------------: | :-------------: | -------- | -------- | ----------------- |
-| x | 在 x 轴上平移距离 | number\| string | No | All | Yes |
-| y | 在 y 轴上平移距离 | number\| string | No | All | Yes |
-| width | 元素宽度 | number\| string | Yes | All | Yes |
-| height | 元素高度 | number\| string | Yes | All | Yes |
-| rx | 定义 x 轴上的半径 | number\| string | No | All | Yes |
-| ry | 定义 y 轴上的半径 | number\| string | No | All | Yes |
-| opacity | 透明度 | number\| string | No | All | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :-----: | :--------------------------------: | :-------------: | -------- | -------- | ----------------- |
+| x | Translation distance on the x-axis | number\| string | No | All | Yes |
+| y | Translation distance on the y-axis | number\| string | No | All | Yes |
+| width | Element width | number\| string | Yes | All | Yes |
+| height | Element height | number\| string | Yes | All | Yes |
+| rx | Defines the radius on the x-axis | number\| string | No | All | Yes |
+| ry | Defines the radius on the y-axis | number\| string | No | All | Yes |
+| opacity | Opacity | number\| string | No | All | Yes |
-**Image**: 图像元素,支持 JPEG、PNG 格式
+**Image**: Image element that supports JPEG and PNG formats
> [!WARNING]
>
-> 注: Image 依赖 Canary3 Sp2 以上版本的 SDK 和 ROM。
+> Note: Image depends on SDK and ROM versions higher than Canary3 Sp2.
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-----------------: | :----------------------------------------: | :------------------------------: | -------- | -------- | ----------------- |
-| x | 在 x 轴上平移距离 | number\| string | No | All | Yes |
-| y | 在 y 轴上平移距离 | number\| string | No | All | Yes |
-| width | 元素宽度 | number\| string | Yes | All | Yes |
-| height | 元素高度 | number\| string | Yes | All | Yes |
-| href | 图像资源引用 | source\| string | Yes | All | Yes |
-| xlinkHref | 用于指定要嵌入的图像的 URL | RNImageProps['source'] \| string | No | All | Yes |
-| preserveAspectRatio | 控制在给定的容器尺寸内如何保持图像的宽高比 | string | No | All | Yes |
-| opacity | 透明度 | source\| string | No | All | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :-----------------: | :----------------------------------------------------------: | :------------------------------: | -------- | -------- | ----------------- |
+| x | Translation distance on the x-axis | number\| string | No | All | Yes |
+| y | Translation distance on the y-axis | number\| string | No | All | Yes |
+| width | Element width | number\| string | Yes | All | Yes |
+| height | Element height | number\| string | Yes | All | Yes |
+| href | Image resource reference | source\| string | Yes | All | Yes |
+| xlinkHref | Used to specify the URL of the image to embed | RNImageProps['source'] \| string | No | All | Yes |
+| preserveAspectRatio | Controls how to maintain the aspect ratio of the image within the given container size | string | No | All | Yes |
+| opacity | Opacity | source\| string | No | All | Yes |
-**Circle**: 园绘制组件,基于圆心和半径生成园形形状
+**Circle**: Circle drawing component that generates circular shapes based on the center and radius
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-----: | :-------------------: | :-------------: | -------- | -------- | ----------------- |
-| r | 园半径 | number\| string | Yes | All | Yes |
-| cx | 圆心在 x 轴上平移距离 | number\| string | No | All | Yes |
-| cy | 圆心在 y 轴上平移距离 | number\| string | No | All | Yes |
-| opacity | 透明度 | number | No | All | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :-----: | :----------------------------------------------: | :-------------: | -------- | -------- | ----------------- |
+| r | Circle radius | number\| string | Yes | All | Yes |
+| cx | Translation distance of the center on the x-axis | number\| string | No | All | Yes |
+| cy | Translation distance of the center on the y-axis | number\| string | No | All | Yes |
+| opacity | Opacity | number | No | All | Yes |
-**Polygon**: 多边形制组件,用于创建至少包含三条边的图形
+**Polygon**: Polygon drawing component used to create shapes with at least three sides
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-----: | :----------------------------: | :------------: | -------- | -------- | ----------------- |
-| points | 定义多边形每个角的 x 和 y 坐标 | string\| array | Yes | All | Yes |
-| opacity | 透明度 | number | No | All | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :-----: | :----------------------------------------------------------: | :------------: | -------- | -------- | ----------------- |
+| points | Defines the x and y coordinates of each corner of the polygon | string\| array | Yes | All | Yes |
+| opacity | Opacity | number | No | All | Yes |
-**Polyline**: 多段线组件,用于创建一条线段构成的轨迹
+**Polyline**: Polyline component used to create a trajectory composed of line segments
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-----: | :------------------------------: | :------------: | -------- | -------- | ----------------- |
-| points | 定义多段线每个端点的 x 和 y 坐标 | string\| array | Yes | All | Yes |
-| opacity | 透明度 | number | No | All | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :-----: | :----------------------------------------------------------: | :------------: | -------- | -------- | ----------------- |
+| points | Defines the x and y coordinates of each endpoint of the polyline | string\| array | Yes | All | Yes |
+| opacity | Opacity | number | No | All | Yes |
-**Defs**:该元素是用于对 Others SVG 元素进行分组的容器
+**Defs**: A container used to group other SVG elements
-> 注: 该组件无 Properties
+> Note: This component has no Properties.
| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :--: | :---------: | :--: | -------- | -------- | ----------------- |
+| :--: | :---------: | :--: | :------- | -------- | ----------------- |
| / | / | / | / | All | Yes |
-**LinearGradient**:用于定义线性渐变
+**LinearGradient**: Used to define linear gradients
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :---------------: | :------------------------------------: | :-------------------------------------: | -------- | -------- | ----------------- |
-| x1 | 在 x 轴上平移距离 | number\| string | No | All | Yes |
-| y1 | 在 y 轴上平移距离 | number\| string | No | All | Yes |
-| x2 | 在 x 轴上平移距离 | number\| string | No | All | Yes |
-| y2 | 在 y 轴上平移距离 | number\| string | No | All | Yes |
-| gradientUnits | 指定元素 Properties 使用的坐标系 | 'userSpaceOnUse' \| 'objectBoundingBox' | No | All | Yes |
-| gradientTransform | 指定从元素当前坐标系到目标坐标系的转换 | ColumnMajorTransformMatrix \| string | No | All | Yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| :---------------: | :----------------------------------------------------------: | :-------------------------------------: | -------- | -------- | ----------------- |
+| x1 | Translation distance on the x-axis | number\| string | No | All | Yes |
+| y1 | Translation distance on the y-axis | number\| string | No | All | Yes |
+| x2 | Translation distance on the x-axis | number\| string | No | All | Yes |
+| y2 | Translation distance on the y-axis | number\| string | No | All | Yes |
+| gradientUnits | Specifies the coordinate system used by the element's Properties | 'userSpaceOnUse' \| 'objectBoundingBox' | No | All | Yes |
+| gradientTransform | Specifies the transformation from the element's current coordinate system to the target coordinate system | ColumnMajorTransformMatrix \| string | No | All | Yes |
-**RadialGradient**:用于定义线性渐变
+**RadialGradient**: Used to define radial gradients
> [!WARNING]
>
-> 注: RadialGradient 依赖 Canary3 Sp2 以上版本的 SDK 和 ROM。
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :---------------: | :------------------------------------: | :-------------------------------------: | -------- | -------- | ----------------- |
-| fx | 起始圆的 x 轴坐标 | number\| string | No | All | Yes |
-| fy | 起始圆的 y 轴坐标 | number\| string | No | All | Yes |
-| rx | 终止椭圆的 x 轴半径 | number\| string | No | All | Yes |
-| ry | 终止椭圆的 y 轴半径 | number\| string | No | All | Yes |
-| cx | 终止圆的 x 轴坐标 | number\| string | No | All | Yes |
-| cy | 终止圆的 y 轴坐标 | number\| string | No | All | Yes |
-| r | 终止圆的半径 | number\| string | No | All | Yes |
-| gradientUnits | 指定元素 Properties 使用的坐标系 | 'userSpaceOnUse' \| 'objectBoundingBox' | No | All | Yes |
-| gradientTransform | 指定从元素当前坐标系到目标坐标系的转换 | ColumnMajorTransformMatrix \| string | No | All | Yes |
-
-**Stop**:定义渐变上的颜色坡度
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :---------: | :------------: | :----: | -------- | -------- | ----------------- |
-| stopColor | 渐变色 | string | No | All | Yes |
-| stopOpacity | 渐变色透明度 | string | No | All | Yes |
-| offset | 渐变色相对位置 | string | No | All | Yes |
-
-**Mask**:定义 alpha 蒙版,用于将当前对象合成到背景中
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :--------------: | ---------------------------------------------------------------------------------------------------------- | ---------- | -------- | -------- | :---------------: |
-| id | 唯一标识 | string | No | All | Yes |
-| x | 左侧顶角横坐标 | NumberProp | No | All | Yes |
-| y | 左侧顶角纵坐标 | NumberProp | No | All | Yes |
-| width | 元素宽度 | NumberProp | No | All | Yes |
-| height | 元素高度 | NumberProp | No | All | Yes |
-| maskUnits | 定义 x,y,width,height 使用的坐标系,默认值为 objectBoundingBox,可以使用 objectBoundingBox\|userSpaceOnUse | TMaskUnits | No | All | Yes |
-| maskContentUnits | 定义内容使用的坐标系,默认值为 userSpaceOnUse,可以使用 objectBoundingBox\|userSpaceOnUse | TMaskUnits | No | All | Yes |
-
-**Use**:该元素可以重复使用 SVG 元素
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-------: | :----------------------------------------------------: | :-------------: | -------- | -------- | ----------------- |
-| x | 在 x 轴上平移距离 | number\| string | No | All | Yes |
-| y | 在 y 轴上平移距离 | number\| string | No | All | Yes |
-| width | 元素宽度 | number\| string | No | All | Yes |
-| height | 元素高度 | number\| string | No | All | Yes |
-| href | 图像资源引用 | source\| string | Yes | All | Yes |
-| xlinkHref | 指定了一个 URI,该 URI 指向了 SVG 文档中定义的一个元素 | string | No | All | Yes |
-| opacity | 透明度 | number\| string | No | All | Yes |
-
-**Ellipse**: 椭圆绘制组件,基于一个中心坐标以及它们的 x 半径和 y 半径
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| :-----: | :-------------------: | :-------------: | -------- | -------- | ----------------- |
-| cx | 圆心在 x 轴上平移距离 | number\| string | No | All | Yes |
-| cy | 圆心在 y 轴上平移距离 | number\| string | No | All | Yes |
-| rx | 定义 x 轴上的半径 | number\| string | No | All | Yes |
-| ry | 定义 y 轴上的半径 | number\| string | No | All | Yes |
-| opacity | 透明度 | number\| string | No | All | Yes |
-
-**Symbol**: 该元素用来定义一个图形模板对象,它可以用一个