From 81cfb68fc252a61c20e8c14aadd27fae35775f40 Mon Sep 17 00:00:00 2001
From: sloop
勇敢的骚年啊,你是选择红药丸还是选择蓝药丸呢?
>
@@ -12,7 +12,7 @@

好了,言止于此,不能说更多了,下面开始我们本篇的正题。
-
+
+
+
勇敢的骚年啊,你是选择红药丸还是选择蓝药丸呢?
->
+
+
我选蓝色的,不要问我为什么。
+
-
+
好了,言止于此,不能说更多了,下面开始我们本篇的正题。
-
+
+ +
勇敢的骚年啊,你是选择红药丸还是选择蓝药丸呢?
@@ -16,6 +17,7 @@ 好了,言止于此,不能说更多了,下面开始我们本篇的正题。 + ## 前言 如题,本篇的主角是 Matrix,在 Canvas 中很多地方都有 Matrix 的身影,如: 画布操作,drawBitmap,path 等。几乎无处不在,那么 Matrix 到底是干什么的呢? From 10d91d6a0177e5ffdb7f35793688247e8bbfb9b4 Mon Sep 17 00:00:00 2001 From: sloopDate: Sun, 26 Jun 2016 21:09:51 +0800 Subject: [PATCH 06/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index f98935f..259feb3 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -2,11 +2,10 @@ 前面扯了四篇 Path 相关的内容,本次终于要到了大家期盼已久的 Matrix,没错,就是传说中的黑客帝国: - +
+- - -
+
勇敢的骚年啊,你是选择红药丸还是选择蓝药丸呢?## 前言 From 225c2f9b137dc06717b7e46abc5a74d652518a70 Mon Sep 17 00:00:00 2001 From: sloop@@ -16,7 +15,7 @@![]()
好了,言止于此,不能说更多了,下面开始我们本篇的正题。 - +Date: Sun, 26 Jun 2016 21:10:54 +0800 Subject: [PATCH 07/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index 259feb3..a93a219 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -2,10 +2,10 @@ 前面扯了四篇 Path 相关的内容,本次终于要到了大家期盼已久的 Matrix,没错,就是传说中的黑客帝国: - +-
+勇敢的骚年啊,你是选择红药丸还是选择蓝药丸呢?From 5c67f4fa02330344f0a911e421de5157d381ef32 Mon Sep 17 00:00:00 2001 From: sloopDate: Sun, 26 Jun 2016 21:16:22 +0800 Subject: [PATCH 08/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index a93a219..2a72584 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -1,25 +1,12 @@ # Matrix基础 -前面扯了四篇 Path 相关的内容,本次终于要到了大家期盼已久的 Matrix,没错,就是传说中的黑客帝国: +前面扯了四篇 Path 相关的内容,本次终于要到了大家期盼已久的 Matrix(传说中的黑客帝国!!!): - ---
-勇敢的骚年啊,你是选择红药丸还是选择蓝药丸呢? + -- -## 前言 - -如题,本篇的主角是 Matrix,在 Canvas 中很多地方都有 Matrix 的身影,如: 画布操作,drawBitmap,path 等。几乎无处不在,那么 Matrix 到底是干什么的呢? +实际上,在2D绘图这一部分,处处都有着 Matrix 的影响,这个如此厉害的 Matrix 到底是什么呢? > **Matrix 的翻译过来是矩阵,模型。和其释义相同,Matrix是一个矩阵,其作用则是一个模型,一个控制视图状态的模型。** From be7814f540e5e401118ea01bb2ea3b2833f8003a Mon Sep 17 00:00:00 2001 From: sloop-我选蓝色的,不要问我为什么。 -+如题,本篇的主角是 Matrix(并不是黑客帝国来着),我们之前在很多地方都见过 Matrix 的身影,如: 画布操作,drawBitmap,path 等。 -![]()
- -好了,言止于此,不能说更多了,下面开始我们本篇的正题。 -Date: Sun, 26 Jun 2016 21:17:24 +0800 Subject: [PATCH 09/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index 2a72584..3a4ec47 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -11,7 +11,7 @@ > **Matrix 的翻译过来是矩阵,模型。和其释义相同,Matrix是一个矩阵,其作用则是一个模型,一个控制视图状态的模型。** -我们之前在 [Canvas之画布操作](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B3%5DCanvas_Convert.md) 中讲解过不少画布相关操作,这些操作的核心就是是操作 Matrix +我们之前在 [Canvas之画布操作](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B3%5DCanvas_Convert.md) 中讲解过不少画布相关操作,这些操作的核心就是改变 Matrix 的数值。 ## Matrix方法表 From 62aeaad7893f60769e6570e62988a5aecb2d3c0f Mon Sep 17 00:00:00 2001 From: sloop Date: Sun, 26 Jun 2016 21:30:06 +0800 Subject: [PATCH 10/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index 3a4ec47..f3138df 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -4,9 +4,11 @@  -如题,本篇的主角是 Matrix(并不是黑客帝国来着),我们之前在很多地方都见过 Matrix 的身影,如: 画布操作,drawBitmap,path 等。 +如题,本篇的主角是 Matrix(其实并不是黑客帝国来着)。 -实际上,在2D绘图这一部分,处处都有着 Matrix 的影响,这个如此厉害的 Matrix 到底是什么呢? +仔细会想一下,我们在很多地方都见过 Matrix(画布操作,drawBitmap,path 等), 感觉它就像是一个烦人家伙,什么事情都想插上一脚。 然而实际情况却并非如此, Matrix 一直都在我们看不到的地方默默付出着, 如果没有了 Matrix, 我们之前的很多方法都是无法运行的。 + +这么说来 Matrix 也算个厉害人物,那么这个 Matrix 到底是何方神圣呢? > **Matrix 的翻译过来是矩阵,模型。和其释义相同,Matrix是一个矩阵,其作用则是一个模型,一个控制视图状态的模型。** From c8d724268c5812d041f3841e7da0eea3589019c2 Mon Sep 17 00:00:00 2001 From: sloop Date: Sun, 26 Jun 2016 21:32:11 +0800 Subject: [PATCH 11/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index f3138df..dee17f7 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -6,14 +6,14 @@ 如题,本篇的主角是 Matrix(其实并不是黑客帝国来着)。 -仔细会想一下,我们在很多地方都见过 Matrix(画布操作,drawBitmap,path 等), 感觉它就像是一个烦人家伙,什么事情都想插上一脚。 然而实际情况却并非如此, Matrix 一直都在我们看不到的地方默默付出着, 如果没有了 Matrix, 我们之前的很多方法都是无法运行的。 +仔细回想一下,我们在很多地方都见过 Matrix(画布操作,drawBitmap,path 等), 感觉它就像是一个烦人家伙,什么事情都想插上一脚。 然而实际情况却并非如此, Matrix 一直都在我们看不到的地方默默付出着, 如果没有了 Matrix, 我们之前的很多方法都是无法运行的。 这么说来 Matrix 也算个厉害人物,那么这个 Matrix 到底是何方神圣呢? > **Matrix 的翻译过来是矩阵,模型。和其释义相同,Matrix是一个矩阵,其作用则是一个模型,一个控制视图状态的模型。** -我们之前在 [Canvas之画布操作](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B3%5DCanvas_Convert.md) 中讲解过不少画布相关操作,这些操作的核心就是改变 Matrix 的数值。 +也就是说, 我们进行界面视图等转换都是需要依靠 Matrix 的帮助的,例如我们之前在 [Canvas之画布操作](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B3%5DCanvas_Convert.md) 中讲解过的画布操作,这些操作的核心就是改变 Matrix 的数值。 ## Matrix方法表 From 60a74ebcd57c4d4ba769c2de043e60cdd1cce224 Mon Sep 17 00:00:00 2001 From: sloop Date: Sun, 26 Jun 2016 21:32:58 +0800 Subject: [PATCH 12/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index dee17f7..723d7fe 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -11,7 +11,7 @@ 这么说来 Matrix 也算个厉害人物,那么这个 Matrix 到底是何方神圣呢? > -**Matrix 的翻译过来是矩阵,模型。和其释义相同,Matrix是一个矩阵,其作用则是一个模型,一个控制视图状态的模型。** +#### Matrix 的翻译过来是矩阵,模型。和其释义相同,Matrix是一个矩阵,其作用则是一个模型,一个控制视图状态的模型。 也就是说, 我们进行界面视图等转换都是需要依靠 Matrix 的帮助的,例如我们之前在 [Canvas之画布操作](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B3%5DCanvas_Convert.md) 中讲解过的画布操作,这些操作的核心就是改变 Matrix 的数值。 From 930c0c72561efb8a8dd6e459485b101eed83064d Mon Sep 17 00:00:00 2001 From: sloop Date: Sun, 26 Jun 2016 22:16:19 +0800 Subject: [PATCH 13/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index 723d7fe..837bac4 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -20,14 +20,15 @@ Matrix 有很多常用和不常用的方法,在本篇中重点不在于这些方法的讲解,而是帮助大家理解 Matrix 的一些基本概念。 方法类别 | 相关API | 摘要 ------------|---------------------------------------------------------|------------------------------------- +-----------|---------------------------------------------------------|------------------------ 比较方法 | equals hashCode | 比较、 获取哈希值 -基本方法 | set reset setValues getValues | 设置、 重置、 设置数值、 获取数值 -矩阵相关 | invert isAffine isIdentity | 计算逆矩阵、 是否是仿射矩阵、 是否是单位矩阵 -数值计算 | mapPoints mapRect mapVectors | 计算 点、 矩形、 阵列 经过变换后点位置 +基本方法 | set reset setValues getValues | 设置、 重置、 设置数值、 获取数值 +数值计算 | mapPoints mapRect mapVectors | 计算变换后的数值 设置(set) | setConcat setRotate setScale setSkew setTranslate | 设置变换 前乘(pre) | preConcat preRotate preScale preSkew preTranslate | 前乘变换 后乘(post) | postConcat postRotate postScale postSkew postTranslate | 后乘变换 +特殊方法 | invert isAffine isIdentity | 逆矩阵、 是否是仿射矩阵、 是否是单位矩阵 +其它方法 | From dc1d2a1c870c848d34b604163a4fdcdfff2450a3 Mon Sep 17 00:00:00 2001 From: sloop Date: Sun, 26 Jun 2016 22:20:36 +0800 Subject: [PATCH 14/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index 837bac4..c4ea87a 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -23,12 +23,12 @@ Matrix 有很多常用和不常用的方法,在本篇中重点不在于这些 -----------|---------------------------------------------------------|------------------------ 比较方法 | equals hashCode | 比较、 获取哈希值 基本方法 | set reset setValues getValues | 设置、 重置、 设置数值、 获取数值 -数值计算 | mapPoints mapRect mapVectors | 计算变换后的数值 +数值计算 | mapPoints mapRadius mapRect mapVectors | 计算变换后的数值 设置(set) | setConcat setRotate setScale setSkew setTranslate | 设置变换 前乘(pre) | preConcat preRotate preScale preSkew preTranslate | 前乘变换 后乘(post) | postConcat postRotate postScale postSkew postTranslate | 后乘变换 -特殊方法 | invert isAffine isIdentity | 逆矩阵、 是否是仿射矩阵、 是否是单位矩阵 -其它方法 | +特殊方法 | setPolyToPoly setRectToRect rectStaysRect setSinCos | 一些特殊操作 +其它方法 | invert isAffine isIdentity toString toShortString | 逆矩阵、 是否是仿射矩阵、 是否是单位矩阵 ... From 5c3bf7a703615009f54f56b459a37849afe146c8 Mon Sep 17 00:00:00 2001 From: sloop Date: Sun, 26 Jun 2016 22:28:43 +0800 Subject: [PATCH 15/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index c4ea87a..b7aff4b 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -27,8 +27,8 @@ Matrix 有很多常用和不常用的方法,在本篇中重点不在于这些 设置(set) | setConcat setRotate setScale setSkew setTranslate | 设置变换 前乘(pre) | preConcat preRotate preScale preSkew preTranslate | 前乘变换 后乘(post) | postConcat postRotate postScale postSkew postTranslate | 后乘变换 -特殊方法 | setPolyToPoly setRectToRect rectStaysRect setSinCos | 一些特殊操作 -其它方法 | invert isAffine isIdentity toString toShortString | 逆矩阵、 是否是仿射矩阵、 是否是单位矩阵 ... +特殊方法 | setPolyToPoly setRectToRect rectStaysRect setSinCos | 一些特殊操作 +其它方法 | invert isAffine isIdentity toString toShortString | 逆矩阵、 是否是仿射矩阵、 是否是单位矩阵 ... From dd803c2e58a5c84a2b933bf75605e4c8fb409264 Mon Sep 17 00:00:00 2001 From: sloop Date: Sun, 26 Jun 2016 22:31:43 +0800 Subject: [PATCH 16/16] Update --- CustomView/Advance/[9]Matrix_Basic.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CustomView/Advance/[9]Matrix_Basic.md b/CustomView/Advance/[9]Matrix_Basic.md index b7aff4b..589ffea 100644 --- a/CustomView/Advance/[9]Matrix_Basic.md +++ b/CustomView/Advance/[9]Matrix_Basic.md @@ -27,8 +27,9 @@ Matrix 有很多常用和不常用的方法,在本篇中重点不在于这些 设置(set) | setConcat setRotate setScale setSkew setTranslate | 设置变换 前乘(pre) | preConcat preRotate preScale preSkew preTranslate | 前乘变换 后乘(post) | postConcat postRotate postScale postSkew postTranslate | 后乘变换 -特殊方法 | setPolyToPoly setRectToRect rectStaysRect setSinCos | 一些特殊操作 -其它方法 | invert isAffine isIdentity toString toShortString | 逆矩阵、 是否是仿射矩阵、 是否是单位矩阵 ... +特殊方法 | setPolyToPoly setRectToRect rectStaysRect setSinCos | 一些特殊操作 +其它方法 | invert isAffine isIdentity toString toShortString | 逆矩阵、 是否是仿射矩阵、 是否是单位矩阵 ... +