Skip to content

Commit 60ddd57

Browse files
committed
Update value compute
1 parent 32ae474 commit 60ddd57

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,18 @@ mapRadius: 70.71068
288288
289289
**3.mapRect**
290290
291+
```
292+
boolean mapRect (RectF rect)
293+
294+
boolean mapRect (RectF dst, RectF src)
295+
```
296+
297+
测量矩形变换后位置。
298+
299+
(1) `boolean mapRect (RectF rect)` 测量rect并将测量结果放入rect中,返回值是判断矩形(Rect)变换后是否仍为矩形。
300+
301+
示例:
302+
291303
``` java
292304
RectF rect = new RectF(400, 400, 1000, 800);
293305
@@ -302,7 +314,12 @@ mapRadius: 70.71068
302314
Log.i(TAG, "mapRadius: "+rect.toString());
303315
```
304316
305-
测量矩形变换后位置。
317+
结果:
318+
319+
```
320+
RectF(400.0, 400.0, 1000.0, 800.0)
321+
RectF(200.0, 400.0, 500.0, 800.0)
322+
```
306323
307324
308325
**4.mapVectors**

0 commit comments

Comments
 (0)