Pergunta

i have to draw circle with free hand in onDraw() method. After drawing the circle, i have to find the radius and center of that circle and show that circle again with drawCircle() method.

Can anyone help me to find the radius and center of circle with free hand drawing.

Foi útil?

Solução

You could take the center as the average of all the points on the edge. And the diameter as the largest distance between any two points.

Or once you have the center, find the distance between each edge point and the point across from it. Then average these.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top