2014-04-21 39 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

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