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.