This commit is contained in:
sloop
2016-05-26 09:20:06 +08:00
parent b53a7e45fe
commit adf9899907

View File

@@ -8,7 +8,7 @@
可以看到,在经过
[Path之基本操作](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B5%5DPath_Basic.md)
[Path之贝塞尔曲线](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B6%5DPath_Bezier.md) 和
[Path之完结篇(伪)](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B7%5DPath_Over.md) 后, Path中各类方法基本上都讲完了表格中还没有讲解到到方法就是矩阵变换了难道本篇终于要讲矩阵了?
[Path之完结篇(伪)](https://github.com/GcsSloop/AndroidNote/blob/master/CustomView/Advance/%5B7%5DPath_Over.md) 后, Path中各类方法基本上都讲完了表格中还没有讲解到到方法就是矩阵变换了难道本篇终于要讲矩阵了
非也矩阵这一部分仍在后面单独讲解本篇主要讲解PathMeasure这个类与Path的一些使用技巧。
@@ -16,6 +16,32 @@
******
## PathMeasure
顾名思义PathMeasure是一个用来测量Path的类主要有以下方法:
### 构造方法
方法名 | 释义
---|---
PathMeasure() | 创建一个空的PathMeasure
PathMeasure(Path path, boolean forceClosed) | 创建PathMeasure并关联一个指定的Path(Path需要已经创建完成)。
### 公共方法
返回值 | 方法名 | 释义
--------|--------------------------------------------------------------------------|-------------------
void | setPath(Path path, boolean forceClosed) | 关联一个Path
boolean | isClosed() | 是否闭合
float | getLength() | 获取Path的长度
boolean | nextContour() | 跳转到下一个轮廓
boolean | getSegment(float startD, float stopD, Path dst, boolean startWithMoveTo) | 截取片段
boolean | getPosTan(float distance, float[] pos, float[] tan) | 获取指定长度的位置坐标及该点切线值
boolean | getMatrix(float distance, Matrix matrix, int flags) | 获取指定长度的位置坐标及该点Matrix