Pregunta

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;
¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top