質問

I have a andoid.graphics.path already created with moveto(),lineTo(),cubeto() and close().

How do I get back all these operations ? I mean something like the following pseodcode:

operations[] = getOperations(mypath);
String sOperation=operation[0].type; // moveto,cubeto,lineto,close
int X=operation[0].x;    
int Y=operation[0].y;
役に立ちましたか?

解決

I'm afraid this isn't possible. In the source of android.graphics.Path, you'll observe that the method directly invokes the native method, and doesn't provide any mechanism of retrieving the segments.

If you wish to keep the tuples, I'd suggest maintaining your own array.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top