Skip to content

Commit 32ae474

Browse files
committed
Update value compute
1 parent b4c34c2 commit 32ae474

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,17 @@ mapRadius: 70.71068
289289
**3.mapRect**
290290
291291
``` java
292+
RectF rect = new RectF(400, 400, 1000, 800);
293+
294+
// 构造一个matrix,x坐标缩放0.5
295+
Matrix matrix = new Matrix();
296+
matrix.setScale(0.5f, 1f);
297+
298+
Log.i(TAG, "mapRadius: "+rect.toString());
299+
300+
matrix.mapRect(rect);
301+
302+
Log.i(TAG, "mapRadius: "+rect.toString());
292303
```
293304
294305
测量矩形变换后位置。

0 commit comments

Comments
 (0)