码迷,mamicode.com
首页 > 移动开发 > 详细

iOS画圆

时间:2015-03-17 11:59:04      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

/* Add an arc of a circle to the context‘s path, possibly preceded by a

   straight line segment. `(x, y)‘ is the center of the arc; `radius‘ is its

   radius; `startAngle‘ is the angle to the first endpoint of the arc;

   `endAngle‘ is the angle to the second endpoint of the arc; and

   `clockwise‘ is 1 if the arc is to be drawn clockwise, 0 otherwise.

   `startAngle‘ and `endAngle‘ are measured in radians. */

  ”(x,y)”是弧的中心,“radius”是它的半径;“startAngle”是第一个的角弧的端点;“endAngle”的第二个端点弧角;和

  “clockwise” == 1电弧是顺时针,否则为0。

  “startAngle”和“endAngle测量的弧度。

 CG_EXTERN void CGContextAddArc(CGContextRef c, CGFloat x, CGFloat y,

  CGFloat radius, CGFloat startAngle, CGFloat endAngle, int clockwise)

  CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0);

 

 CGContextAddArc(context, x, y, 3, 0, 2*PI, 0); //添加一个圆   圆心为(x, y)半径为3 圆周为2*PI的小圆,

iOS画圆

标签:

原文地址:http://www.cnblogs.com/pjl111/p/4343882.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!