I'm working with some example code that draws an arc using CGPaths. I've had a look around and have found documentation but I just can't seem to visualize in my head whats going on in terms of using MoveToPoint, AddLineToPoint etc. I can't 'see' what the code is doing I can just see the result.
For example the code below draws an arc a full 360 degrees beginning from the 3 o clock position. For the life of me I can't figure out how to make it begin from the 12 o clock position with actually rotating the view - 90 degrees.
Could somebody help me figure out this code and how I would change it to achieve the beginning from 12 o'clock, preferably trying to explain how this whole paths things works. Or maybe point me to a visual resource online?
- (void)drawPathWithArc:(CGFloat)arc {
CGMutablePathRef thePath = CGPathCreateMutable();
CGPathMoveToPoint(thePath, NULL, 100.f, 100.f);
CGPathAddLineToPoint(thePath, NULL, 200.f, 100.f);
CGPathAddArc(thePath, NULL, 100.f, 100.f, 100.f, 0.f, (360* M_PI)/180, NO);
CGPathCloseSubpath(thePath);
shapeLayer_.path = thePath;
CGPathRelease(thePath);
}