문제

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