I am attempting to draw and arc using "appendBezierPathWithArcFromPoint" but when run, it doesn't draw the arc. The "lineToPont" works and other "NSBezierPath" commands work. Can anyone please help by telling me what I am doing wrong. I have done quite a bit of serching with no clear answer. I am using MAC OS 10.9.2 and XCode 5.1. Below is the snipet of code. Thank You.
#import "MyView.h"
@implementation MyView
- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}
return self;
}
- (void)drawRect:(NSRect)dirtyRect
{
[super drawRect:dirtyRect];
NSRect bounds = [self bounds];
NSBezierPath *thePath = [NSBezierPath bezierPath]; // all drawing instruction goes to thePath.
[NSBezierPath setDefaultLineWidth:2.0];
[[NSColor blackColor] set];
[thePath moveToPoint:NSMakePoint(0, 0)];
[thePath lineToPoint:NSMakePoint(100, 30)];
[thePath appendBezierPathWithArcFromPoint:NSMakePoint(100,30) toPoint:NSMakePoint(130,0) radius:30];
[thePath stroke];
}
@end