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

!21177 21023挑单到4.0beta1

Merge pull request !21177 from 田雨/rel720
......@@ -68,7 +68,9 @@ getPixelMap(): image.PixelMap;
**示例:**
```ts
pixmap: PixelMap = drawable1.getPixelMap();
let resManager = getContext().resourceManager
pixmap: PixelMap = (<DrawableDescriptor> (resManager.getDrawableDescriptor($r('app.media.icon')
.id))).getPixelMap();
```
## LayeredDrawableDescriptor.getPixelMap
......@@ -86,7 +88,9 @@ getPixelMap(): image.PixelMap;
**示例:**
```ts
pixmap: PixelMap = layeredDrawable1.getPixelMap();
let resManager = getContext().resourceManager
pixmap: PixelMap = (<LayeredDrawableDescriptor> (resManager.getDrawableDescriptor($r('app.media.drawable')
.id))).getPixelMap();
```
## LayeredDrawableDescriptor.getForeground
......@@ -104,7 +108,9 @@ getForeground(): DrawableDescriptor;
**示例:**
```ts
drawable: DrawableDescriptor = layeredDrawable1.getForeground();
let resManager = getContext().resourceManager
drawable: DrawableDescriptor = (<LayeredDrawableDescriptor> (resManager.getDrawableDescriptor($r('app.media.drawable')
.id))).getForeground();
```
## LayeredDrawableDescriptor.getBackground
......@@ -122,7 +128,9 @@ getBackground(): DrawableDescriptor;
**示例:**
```ts
drawable: DrawableDescriptor = layeredDrawable1.getBackground();
let resManager = getContext().resourceManager
drawable: DrawableDescriptor = (<LayeredDrawableDescriptor> (resManager.getDrawableDescriptor($r('app.media.drawable')
.id))).getBackground();
```
## LayeredDrawableDescriptor.getMask
......@@ -140,5 +148,7 @@ getMask(): DrawableDescriptor;
**示例:**
```ts
drawable: DrawableDescriptor = layeredDrawable1.getMask();
let resManager = getContext().resourceManager
drawable: DrawableDescriptor = (<LayeredDrawableDescriptor> (resManager.getDrawableDescriptor($r('app.media.drawable')
.id))).getMask();
```
......@@ -41,7 +41,7 @@ initCurve(curve?: Curve): ICurve
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
| 名称 | 描述 |
| 名称 | 说明 |
| ------------------- | ------------------------------------------------------------ |
| Linear | 表示动画从头到尾的速度都是相同的。 |
| Ease | 表示动画以低速开始,然后加快,在结束前变慢,CubicBezier(0.25, 0.1, 0.25, 1.0)。 |
......@@ -284,7 +284,7 @@ import Curves from '@ohos.curves'
interpolate(fraction) {
return Math.sqrt(fraction);
}
private curve = Curves.customCurve(this.interpolate) // 创建一个用户自定义插值曲线
let curve = Curves.customCurve(interpolate) // 创建一个用户自定义插值曲线
```
......
......@@ -27,7 +27,7 @@ Matrix的构造函数,可以通过传入的参数创建一个四阶矩阵,
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| option | [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number] | 是 | 参数为长度为16(4\*4)的number数组,&nbsp;详情见四阶矩阵说明。<br/>默认值:<br/>[1,&nbsp;0,&nbsp;0,&nbsp;0,<br/>0,&nbsp;1,&nbsp;0,&nbsp;0,<br/>0,&nbsp;0,&nbsp;1,&nbsp;0,<br/>0,&nbsp;0,&nbsp;0,&nbsp;1] |
| option | [number,number,number,number,<br/>number,number,number,number,<br/>number,number,number,number,<br/>number,number,number,number] | 是 | 参数为长度为16(4\*4)的number数组,&nbsp;详情见四阶矩阵说明。<br/>默认值:<br/>[1,&nbsp;0,&nbsp;0,&nbsp;0,<br/>0,&nbsp;1,&nbsp;0,&nbsp;0,<br/>0,&nbsp;0,&nbsp;1,&nbsp;0,<br/>0,&nbsp;0,&nbsp;0,&nbsp;1] |
**返回值:**
......@@ -170,6 +170,132 @@ struct Test {
![zh-cn_image_0000001219744181](figures/zh-cn_image_0000001219744181.png)
## matrix4.invert<sup>(deprecated)</sup>
invert(): Matrix4Transit
Matrix的逆函数,可以返回一个当前矩阵对象的逆矩阵,即效果正好相反。
该接口从Api 10开始废弃。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**返回值:**
| 类型 | 说明 |
| --------------------------------- | ---------------------- |
| [Matrix4Transit](#matrix4transit) | 当前矩阵的逆矩阵对象。 |
## matrix4.combine<sup>(deprecated)</sup>
combine(options: Matrix4Transit): Matrix4Transit
Matrix的叠加函数,可以将两个矩阵的效果叠加起来生成一个新的矩阵对象。
该接口从Api 10开始废弃。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | --------------------------------- | ---- | ------------------ |
| option | [Matrix4Transit](#matrix4transit) | 是 | 待叠加的矩阵对象。 |
**返回值:**
| 类型 | 说明 |
| --------------------------------- | ---------------------- |
| [Matrix4Transit](#matrix4transit) | 当前矩阵的逆矩阵对象。 |
## matrix4.translate<sup>(deprecated)</sup>
translate(options: TranslateOption): Matrix4Transit
Matrix的平移函数,可以为当前矩阵增加x轴/y轴/z轴平移效果。
该接口从Api 10开始废弃。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ----------------------------------- | ---- | -------------- |
| option | [TranslateOption](#translateoption) | 是 | 设置平移参数。 |
**返回值:**
| 类型 | 说明 |
| --------------------------------- | ---------------------- |
| [Matrix4Transit](#matrix4transit) | 当前矩阵的逆矩阵对象。 |
## matrix4.scale<sup>(deprecated)</sup>
scale(options: ScaleOption): Matrix4Transit
Matrix的缩放函数,可以为当前矩阵增加x轴/y轴/z轴缩放效果。
该接口从Api 10开始废弃。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | --------------------------- | ---- | -------------- |
| option | [ScaleOption](#scaleoption) | 是 | 设置缩放参数。 |
**返回值:**
| 类型 | 说明 |
| --------------------------------- | ---------------------- |
| [Matrix4Transit](#matrix4transit) | 当前矩阵的逆矩阵对象。 |
## matrix4.rotate<sup>(deprecated)</sup>
rotate(options: RotateOption): Matrix4Transit
Matrix的旋转函数,可以为当前矩阵增加x轴/y轴/z轴旋转效果。
该接口从Api 10开始废弃。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ----------------------------- | ---- | -------------- |
| option | [RotateOption](#rotateoption) | 是 | 设置旋转参数。 |
**返回值:**
| 类型 | 说明 |
| --------------------------------- | ---------------------- |
| [Matrix4Transit](#matrix4transit) | 当前矩阵的逆矩阵对象。 |
## matrix4.transformPoint<sup>(deprecated)</sup>
transformPoint(options: [number, number]): [number, number]
Matrix的坐标点转换函数,可以将当前的变换效果作用到一个坐标点上。
该接口从Api 10开始废弃。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ---------------- | ---- | ------------------ |
| option | [number, number] | 是 | 需要转换的坐标点。 |
**返回值:**
| 类型 | 说明 |
| ---------------- | --------------------------- |
| [number, number] | 返回矩阵变换后的Point对象。 |
## Matrix4Transit
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册