Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Draw circular sector

I want to draw a circular sector. I saw here how to do a circle, which is pretty obvious. What is the best way to draw a circular sector?

  • Does exist any method for that
  • I should do some geometry calculation in order to draw it by myself
like image 557
Paolo Avatar asked Dec 09 '11 13:12

Paolo


2 Answers

I assume you are looking for something like canvas.drawArc() ?

like image 140
Jave Avatar answered Oct 01 '22 08:10

Jave


Unfortunately, there isn't a method to do what you want, but you can use drawArc and drawLine. Some info on how to compute the necessary coordinates can be found in this article.

like image 24
Gabriel Negut Avatar answered Oct 01 '22 09:10

Gabriel Negut