【发布时间】:2016-12-02 08:37:20
【问题描述】:
现在我正在学习如何在 android 中使用 pathmeasure。我有 3 条路径:entryPath、leftPath 和 rightPath。当我想将这些路径添加到路径测量中时,我试过这个:
mTickPath.addPath(entryPath);
mTickPath.addPath(leftPath);
mTickPath.addPath(rightPath);
mTickMeasure = new PathMeasure(mTickPath, false);
// mTickMeasure is a PathMeasure
但是我遇到了一个问题,我的 mTickMeasure.getLenth() 等于 entryPath。mTickPath 与 entryPath 不同,我使用了 canvas.drawPath(mTickPath,paint) 并且我在屏幕上显示了它们的路径。
【问题讨论】: