提交 8d966e6e 编写于 作者: Y yamila

update apis

Signed-off-by: Nyamila <tianyu55@huawei.com>
上级 402ed019
...@@ -34,6 +34,12 @@ get(id: string, callback: AsyncCallback<image.PixelMap>): void ...@@ -34,6 +34,12 @@ get(id: string, callback: AsyncCallback<image.PixelMap>): void
| id | string | 是 | 目标组件的[组件标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识) | | id | string | 是 | 目标组件的[组件标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识) |
| callback | AsyncCallback&lt;image.PixelMap&gt; | 是 | 截图返回结果的回调。 | | callback | AsyncCallback&lt;image.PixelMap&gt; | 是 | 截图返回结果的回调。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 100001 | if id is not valid. |
**示例:** **示例:**
```js ```js
...@@ -159,6 +165,12 @@ createFromBuilder(builder: CustomBuilder, callback: AsyncCallback<image.PixelMap ...@@ -159,6 +165,12 @@ createFromBuilder(builder: CustomBuilder, callback: AsyncCallback<image.PixelMap
| builder | [CustomBuilder](../arkui-ts/ts-types.md#custombuilder8) | 是 | 自定义组件构建函数。 | | builder | [CustomBuilder](../arkui-ts/ts-types.md#custombuilder8) | 是 | 自定义组件构建函数。 |
| callback | AsyncCallback&lt;image.PixelMap&gt; | 是 | 截图返回结果的回调。 | | callback | AsyncCallback&lt;image.PixelMap&gt; | 是 | 截图返回结果的回调。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | ----------------------------------------- |
| 100001 | if builder is not a valid build function. |
**示例:** **示例:**
```ts ```ts
......
...@@ -30,12 +30,14 @@ registerFont(options: FontOptions): void ...@@ -30,12 +30,14 @@ registerFont(options: FontOptions): void
## FontOptions ## FontOptions
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ---------- | ------ | ---- | ------------ | | ---------- | ------ | ---- | ------------ |
| familyName | string | 是 | 设置注册的字体名称。 | | familyName | string | 是 | 设置注册的字体名称。 |
| familySrc | string | 是 | 设置注册字体文件的路径。 | | familySrc | string | 是 | 设置注册字体文件的路径。 |
## 示例 **示例:**
```ts ```ts
// xxx.ets // xxx.ets
...@@ -64,4 +66,3 @@ struct FontExample { ...@@ -64,4 +66,3 @@ struct FontExample {
} }
} }
``` ```
...@@ -16,7 +16,7 @@ import matrix4 from '@ohos.matrix4' ...@@ -16,7 +16,7 @@ import matrix4 from '@ohos.matrix4'
## matrix4.init ## matrix4.init
init(option: [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number]): Matrix4Transit init(options: [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number]): Matrix4Transit
Matrix的构造函数,可以通过传入的参数创建一个四阶矩阵,矩阵为列优先。 Matrix的构造函数,可以通过传入的参数创建一个四阶矩阵,矩阵为列优先。
...@@ -176,7 +176,7 @@ struct Test { ...@@ -176,7 +176,7 @@ struct Test {
### combine ### combine
combine(option: Matrix4Transit): Matrix4Transit combine(options: Matrix4Transit): Matrix4Transit
Matrix的叠加函数,可以将两个矩阵的效果叠加起来生成一个新的矩阵对象。 Matrix的叠加函数,可以将两个矩阵的效果叠加起来生成一个新的矩阵对象。
...@@ -273,7 +273,7 @@ struct Tests { ...@@ -273,7 +273,7 @@ struct Tests {
### translate ### translate
translate(option: TranslateOption): Matrix4Transit translate(options: TranslateOption): Matrix4Transit
Matrix的平移函数,可以为当前矩阵增加x轴/y轴/z轴平移效果。 Matrix的平移函数,可以为当前矩阵增加x轴/y轴/z轴平移效果。
...@@ -317,7 +317,7 @@ struct Test { ...@@ -317,7 +317,7 @@ struct Test {
### scale ### scale
scale(option: ScaleOption): Matrix4Transit scale(options: ScaleOption): Matrix4Transit
Matrix的缩放函数,可以为当前矩阵增加x轴/y轴/z轴缩放效果。 Matrix的缩放函数,可以为当前矩阵增加x轴/y轴/z轴缩放效果。
...@@ -361,7 +361,7 @@ struct Test { ...@@ -361,7 +361,7 @@ struct Test {
### rotate ### rotate
rotate(option: RotateOption): Matrix4Transit rotate(options: RotateOption): Matrix4Transit
Matrix的旋转函数,可以为当前矩阵增加x轴/y轴/z轴旋转效果。 Matrix的旋转函数,可以为当前矩阵增加x轴/y轴/z轴旋转效果。
...@@ -406,7 +406,7 @@ struct Test { ...@@ -406,7 +406,7 @@ struct Test {
### transformPoint ### transformPoint
transformPoint(option: [number, number]): [number, number] transformPoint(options: [number, number]): [number, number]
Matrix的坐标点转换函数,可以将当前的变换效果作用到一个坐标点上。 Matrix的坐标点转换函数,可以将当前的变换效果作用到一个坐标点上。
...@@ -464,15 +464,15 @@ struct Test { ...@@ -464,15 +464,15 @@ struct Test {
## TranslateOption ## TranslateOption
| 参数名 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ----------------------------------------------------------- | | ---- | ------ | ---- | ----------------------------------------------------------- |
| x | number | 否 | x轴的平移距离,单位px。<br/>默认值:0<br/>取值范围 (-∞, +∞) | | x | number | 否 | x轴的平移距离,单位px。<br/>默认值:0<br/>取值范围 (-∞, +∞) |
| y | number | 否 | y轴的平移距离,单位px。<br/>默认值:0<br/>取值范围 (-∞, +∞) | | y | number | 否 | y轴的平移距离,单位px。<br/>默认值:0<br/>取值范围 (-∞, +∞) |
| z | number | 否 | z轴的平移距离,单位px。<br/>默认值:0<br/>取值范围 (-∞, +∞) | | z | number | 否 | z轴的平移距离,单位px。<br/>默认值:0<br/>取值范围 (-∞, +∞) |
## ScaleOption ## ScaleOption
| 参数名 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ------- | ------ | ---- | ------------------------------------------------------------ | | ------- | ------ | ---- | ------------------------------------------------------------ |
| x | number | 否 | x轴的缩放倍数。x>1时以x轴方向放大,x<1时以x轴方向缩小。<br/>默认值:1<br/>取值范围 [0, +∞)<br/>**说明:** <br/>设置小于0的值时,按照默认值处理。 | | x | number | 否 | x轴的缩放倍数。x>1时以x轴方向放大,x<1时以x轴方向缩小。<br/>默认值:1<br/>取值范围 [0, +∞)<br/>**说明:** <br/>设置小于0的值时,按照默认值处理。 |
| y | number | 否 | y轴的缩放倍数。y>1时以y轴方向放大,y<1时以y轴方向缩小。<br/>默认值:1<br/>取值范围 [0, +∞)<br/>**说明:** <br/>设置小于0的值时,按照默认值处理。 | | y | number | 否 | y轴的缩放倍数。y>1时以y轴方向放大,y<1时以y轴方向缩小。<br/>默认值:1<br/>取值范围 [0, +∞)<br/>**说明:** <br/>设置小于0的值时,按照默认值处理。 |
...@@ -482,7 +482,7 @@ struct Test { ...@@ -482,7 +482,7 @@ struct Test {
## RotateOption ## RotateOption
| 参数名 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ------- | ------ | ---- | ------------------------------------------------------- | | ------- | ------ | ---- | ------------------------------------------------------- |
| x | number | 否 | 旋转轴向量x坐标。<br/>默认值:1。<br/>取值范围 (-∞, +∞) | | x | number | 否 | 旋转轴向量x坐标。<br/>默认值:1。<br/>取值范围 (-∞, +∞) |
| y | number | 否 | 旋转轴向量y坐标。<br/>默认值:1。<br/>取值范围 (-∞, +∞) | | y | number | 否 | 旋转轴向量y坐标。<br/>默认值:1。<br/>取值范围 (-∞, +∞) |
......
...@@ -262,7 +262,7 @@ pluginComponentManager.push( ...@@ -262,7 +262,7 @@ pluginComponentManager.push(
name: "ets/pages/plugin2.js", name: "ets/pages/plugin2.js",
data: { data: {
"js": "ets/pages/plugin.js", "js": "ets/pages/plugin.js",
"key_1": 1111, , "key_1": 1111,
}, },
extraData: { extraData: {
"extra_str": "this is push event" "extra_str": "this is push event"
......
...@@ -670,7 +670,7 @@ struct Second { ...@@ -670,7 +670,7 @@ struct Second {
Text(this.text) Text(this.text)
.fontSize(30) .fontSize(30)
.onClick(() => { .onClick(() => {
this.secondData = (this.data.['array'][1]).toString() this.secondData = (this.data['array'][1]).toString()
}) })
.margin({ top: 20 }) .margin({ top: 20 })
Text(`第一页传来的数值:${this.secondData}`) Text(`第一页传来的数值:${this.secondData}`)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册