From 60ddd57d379bf5f50515bc70c87d0c3562477b00 Mon Sep 17 00:00:00 2001 From: sloop Date: Fri, 12 Aug 2016 22:01:01 +0800 Subject: [PATCH] Update value compute --- CustomView/Advance/[10]Matrix_Method.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/CustomView/Advance/[10]Matrix_Method.md b/CustomView/Advance/[10]Matrix_Method.md index 727ebaa..74457a1 100644 --- a/CustomView/Advance/[10]Matrix_Method.md +++ b/CustomView/Advance/[10]Matrix_Method.md @@ -288,6 +288,18 @@ mapRadius: 70.71068 **3.mapRect** +``` +boolean mapRect (RectF rect) + +boolean mapRect (RectF dst, RectF src) +``` + +测量矩形变换后位置。 + +(1) `boolean mapRect (RectF rect)` 测量rect并将测量结果放入rect中,返回值是判断矩形(Rect)变换后是否仍为矩形。 + +示例: + ``` java RectF rect = new RectF(400, 400, 1000, 800); @@ -302,7 +314,12 @@ mapRadius: 70.71068 Log.i(TAG, "mapRadius: "+rect.toString()); ``` -测量矩形变换后位置。 +结果: + +``` +RectF(400.0, 400.0, 1000.0, 800.0) +RectF(200.0, 400.0, 500.0, 800.0) +``` **4.mapVectors**