2014-04-21 40 views
1

我有一个已经用moveto(),lineTo(),cubeto()和close()创建的andoid.graphics.path。如何获取android.graphics.path的所有片段

如何取回所有这些操作? 我的意思是像下面pseodcode:

operations[] = getOperations(mypath); 
String sOperation=operation[0].type; // moveto,cubeto,lineto,close 
int X=operation[0].x;  
int Y=operation[0].y; 

回答

0

这恐怕是不可能的。 In the source of android.graphics.Path,你会发现该方法直接调用本地方法,并没有提供任何检索段的机制。如果你想保留元组,我建议维护自己的数组。

+0

非常感谢。我懂了... –