开发者

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 differ开发者_如何学运维ent color.


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))
  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜