satheesh
satheesh

Reputation: 197

display circle in android using drawarc method

how to create circle in android using drawarc method. or how to split a circle in 6 parts. each part contain different color.

Upvotes: 0

Views: 890

Answers (1)

Hamster_NL
Hamster_NL

Reputation: 153

I would create an array holding 6 colors (paint), then use a loop to create the 6 parts of the arc

Like

  for(int i = 0; i < color.length; i++){
     drawArc (RectF oval, 60*i , 60*(i+1), True, color(i))
  }

Or

  for(int i = 0; i < color.length; i++){
     drawArc (RectF oval, (360/color.length)*i , (360/color.length)*(i+1), True, color(i))
  }

Upvotes: 2

Related Questions