Skip to content

Commit b4c34c2

Browse files
committed
Fix code view
1 parent 3ada722 commit b4c34c2

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

‎CustomView/Advance/[10]Matrix_Method.md‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030

3131
**无参构造**
3232

33-
```
33+
``` java
3434
Matrix ()
3535
```
3636
创建一个全新的Matrix,使用格式如下:
3737

38-
```
38+
``` java
3939
Matrix matrix = new Matrix();
4040
```
4141

@@ -55,13 +55,13 @@ $$)
5555
5656
**有参构造**
5757
58-
```
58+
``` java
5959
Matrix (Matrix src)
6060
```
6161
6262
这种方法则需要一个已经存在的矩阵作为参数,使用格式如下:
6363
64-
```
64+
``` java
6565
Matrix matrix = new Matrix(src);
6666
```
6767
@@ -95,31 +95,31 @@ Matrix matrix = new Matrix(src);
9595
9696
**1.set**
9797
98-
```
98+
``` java
9999
void set (Matrix src)
100100
```
101101
102102
没有返回值,有一个参数,作用是将参数Matrix的数值复制到当前Matrix中。如果参数为空,则重置当前Matrix,相当于`reset()`。
103103
104104
**2.reset**
105105
106-
```
106+
``` java
107107
void reset ()
108108
```
109109
110110
重置当前Matrix(将当前Matrix重置为单位矩阵)。
111111
112112
**3.setValues**
113113
114-
```
114+
``` java
115115
void setValues (float[] values)
116116
```
117117
118118
setValues的参数是浮点型的一维数组,长度需要大于9,拷贝数组中的前9位数值赋值给当前Matrix。
119119
120120
**4.getValues**
121121
122-
```
122+
``` java
123123
void getValues (float[] values)
124124
```
125125
@@ -129,7 +129,7 @@ void getValues (float[] values)
129129
130130
**1.mapPoints**
131131
132-
```
132+
``` java
133133
void mapPoints (float[] pts)
134134
135135
void mapPoints (float[] dst, float[] src)
@@ -255,11 +255,15 @@ after : dst=[40.0, 100.0, 200.0, 300.0, 0.0, 0.0]
255255
256256
**2.mapRadius**
257257
258+
``` java
259+
float mapRadius (float radius)
260+
```
261+
258262
测量半径,由于圆可能会因为画布变换变成椭圆,所以此处测量的是平均半径。
259263
260264
示例:
261265
262-
```
266+
``` java
263267
float radius = 100;
264268
float result = 0;
265269
@@ -284,6 +288,9 @@ mapRadius: 70.71068
284288
285289
**3.mapRect**
286290
291+
``` java
292+
```
293+
287294
测量矩形变换后位置。
288295
289296

0 commit comments

Comments
 (0)