提交 70017adf 编写于 作者: L limeng

fix the problem for review

Signed-off-by: Nlimeng <limeng208@huawei.com>
上级 9bb6cf61
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
### setTransform ### setTransform
setTransform(transform?: Matrix2D): void; setTransform(transform?: Matrix2D): void
使用Matrix2D对象作为参数、对当前CanvasPattern进行矩阵变换。 使用Matrix2D对象作为参数、对当前CanvasPattern进行矩阵变换。
...@@ -24,7 +24,7 @@ setTransform(transform?: Matrix2D): void; ...@@ -24,7 +24,7 @@ setTransform(transform?: Matrix2D): void;
**示例:** **示例:**
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
......
...@@ -25,11 +25,11 @@ Matrix2D() ...@@ -25,11 +25,11 @@ Matrix2D()
> **说明:** > **说明:**
> >
> 可使用[px2vp](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-pixel-units.md)接口进行单位转换。 > 可使用[px2vp](ts-pixel-units.md)接口进行单位转换。
### scaleX ### scaleX
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -64,7 +64,7 @@ struct Matrix2DScaleX { ...@@ -64,7 +64,7 @@ struct Matrix2DScaleX {
### scaleY ### scaleY
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -99,7 +99,7 @@ struct Matrix2DScaleY { ...@@ -99,7 +99,7 @@ struct Matrix2DScaleY {
### rotateX ### rotateX
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -134,7 +134,7 @@ struct Matrix2DRotateX { ...@@ -134,7 +134,7 @@ struct Matrix2DRotateX {
### rotateY ### rotateY
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -169,7 +169,7 @@ struct Matrix2DRotateY { ...@@ -169,7 +169,7 @@ struct Matrix2DRotateY {
### translateX ### translateX
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -204,7 +204,7 @@ struct Matrix2DTranslateX { ...@@ -204,7 +204,7 @@ struct Matrix2DTranslateX {
### translateY ### translateY
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -241,7 +241,7 @@ struct Matrix2DTranslateY { ...@@ -241,7 +241,7 @@ struct Matrix2DTranslateY {
### identity ### identity
identity(): Matrix2D; identity(): Matrix2D
创建一个单位矩阵。 创建一个单位矩阵。
...@@ -255,7 +255,7 @@ identity(): Matrix2D; ...@@ -255,7 +255,7 @@ identity(): Matrix2D;
**示例:** **示例:**
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -277,7 +277,7 @@ struct Matrix2DIdentity { ...@@ -277,7 +277,7 @@ struct Matrix2DIdentity {
Button("matrix identity") Button("matrix identity")
.onClick(() => { .onClick(() => {
var matrix : Matrix2D = new Matrix2D() var matrix : Matrix2D = new Matrix2D()
matrix.identity() matrix = matrix.identity()
this.printMatrix(this.message, matrix) this.printMatrix(this.message, matrix)
}) })
} }
...@@ -290,7 +290,7 @@ struct Matrix2DIdentity { ...@@ -290,7 +290,7 @@ struct Matrix2DIdentity {
### invert ### invert
invert(): Matrix2D; invert(): Matrix2D
得到当前矩阵的逆矩阵。 得到当前矩阵的逆矩阵。
...@@ -304,7 +304,7 @@ invert(): Matrix2D; ...@@ -304,7 +304,7 @@ invert(): Matrix2D;
**示例:** **示例:**
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -314,8 +314,8 @@ struct Matrix2DInvert { ...@@ -314,8 +314,8 @@ struct Matrix2DInvert {
printMatrix(title, matrix) { printMatrix(title, matrix) {
console.log(title) console.log(title)
console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY +
", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY +
", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]")
} }
build() { build() {
Row() { Row() {
...@@ -345,7 +345,7 @@ struct Matrix2DInvert { ...@@ -345,7 +345,7 @@ struct Matrix2DInvert {
### multiply ### multiply
multiply(other?: Matrix2D): Matrix2D; multiply(other?: Matrix2D): Matrix2D
当前矩阵与目标矩阵相乘。 当前矩阵与目标矩阵相乘。
...@@ -367,7 +367,7 @@ multiply(other?: Matrix2D): Matrix2D; ...@@ -367,7 +367,7 @@ multiply(other?: Matrix2D): Matrix2D;
**示例:** **示例:**
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -377,8 +377,8 @@ struct Matrix2DMultiply { ...@@ -377,8 +377,8 @@ struct Matrix2DMultiply {
printMatrix(title, matrix) { printMatrix(title, matrix) {
console.log(title) console.log(title)
console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY +
", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY +
", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]")
} }
build() { build() {
Row() { Row() {
...@@ -415,11 +415,11 @@ struct Matrix2DMultiply { ...@@ -415,11 +415,11 @@ struct Matrix2DMultiply {
### rotate<sup>10+</sup> ### rotate<sup>10+</sup>
rotate(degree: number, rx?: number, ry?: number): Matrix2D; rotate(degree: number, rx?: number, ry?: number): Matrix2D
以旋转点为中心、对当前矩阵进行右乘旋转运算。 以旋转点为中心、对当前矩阵进行右乘旋转运算。
从API version 9开始,该接口支持在ArkTS卡片中使用。 从API version 10开始,该接口支持在ArkTS卡片中使用。
**参数:** **参数:**
...@@ -437,7 +437,7 @@ rotate(degree: number, rx?: number, ry?: number): Matrix2D; ...@@ -437,7 +437,7 @@ rotate(degree: number, rx?: number, ry?: number): Matrix2D;
**示例:** **示例:**
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -447,8 +447,8 @@ struct Matrix2DRotate { ...@@ -447,8 +447,8 @@ struct Matrix2DRotate {
printMatrix(title, matrix) { printMatrix(title, matrix) {
console.log(title) console.log(title)
console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY +
", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY +
", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]")
} }
build() { build() {
Row() { Row() {
...@@ -478,7 +478,7 @@ struct Matrix2DRotate { ...@@ -478,7 +478,7 @@ struct Matrix2DRotate {
### translate ### translate
translate(tx?: number, ty?: number): Matrix2D; translate(tx?: number, ty?: number): Matrix2D
对当前矩阵进行左乘平移运算。 对当前矩阵进行左乘平移运算。
...@@ -499,7 +499,7 @@ translate(tx?: number, ty?: number): Matrix2D; ...@@ -499,7 +499,7 @@ translate(tx?: number, ty?: number): Matrix2D;
**示例:** **示例:**
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -509,8 +509,8 @@ struct Matrix2DTranslate { ...@@ -509,8 +509,8 @@ struct Matrix2DTranslate {
printMatrix(title, matrix) { printMatrix(title, matrix) {
console.log(title) console.log(title)
console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY +
", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY +
", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]")
} }
build() { build() {
Row() { Row() {
...@@ -540,7 +540,7 @@ struct Matrix2DTranslate { ...@@ -540,7 +540,7 @@ struct Matrix2DTranslate {
### scale ### scale
scale(sx?: number, sy?: number): Matrix2D; scale(sx?: number, sy?: number): Matrix2D
对当前矩阵进行右乘缩放运算。 对当前矩阵进行右乘缩放运算。
...@@ -561,7 +561,7 @@ scale(sx?: number, sy?: number): Matrix2D; ...@@ -561,7 +561,7 @@ scale(sx?: number, sy?: number): Matrix2D;
**示例:** **示例:**
```typescript ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
...@@ -571,8 +571,8 @@ struct Matrix2DScale { ...@@ -571,8 +571,8 @@ struct Matrix2DScale {
printMatrix(title, matrix) { printMatrix(title, matrix) {
console.log(title) console.log(title)
console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY +
", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY +
", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]")
} }
build() { build() {
Row() { Row() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册