美文网首页
CGContextAddArc-CGContextAddArcT

CGContextAddArc-CGContextAddArcT

作者: 码农二哥 | 来源:发表于2016-11-02 10:44 被阅读39次

CGContextAddArc

CGContextAddArc does this:

addArc

where the red line is what will be drawn, sA is startAngle, eA is the endAngle, r is radius, and x and y are x and y. If you have a previous point the function will line from this point to the start of the arc (unless you are careful this line won't be going in the same direction as the arc).

CGContextAddArcToPoint

CGContextAddArcToPoint works like this:

addArc

Where P1 is the current point of the path, the x1, x2, y1, y2 match the functions x1, x2, y1, y2 and r is radius. The arc will start in the same direction as the line between the current point and (x1, y1) and end in the direction between (x1, y1) and (x2, y2). it won't line to (x2, y2) It will stop at the end of the circle.

UIBezierPath精讲

References

相关文章

网友评论

      本文标题:CGContextAddArc-CGContextAddArcT

      本文链接:https://www.haomeiwen.com/subject/dasvuttx.html