- Joined
- Mar 14, 2007
- Messages
- 1
- Reaction score
- 0
Hi, sorry to be a pain, i'm new to cocoa and development
I'm trying to draw a line, but nothing appears - here is the source
#import <Cocoa/Cocoa.h>
#import <stdio.h>
int main(int argc, char *argv[])
{
NSBezierPath* aPath = [NSBezierPath bezierPath];
[aPath moveToPoint:NSMakePoint(0.0, 0.0)];
[aPath lineToPoint:NSMakePoint(100.0, 100.0)];
[aPath lineToPoint:NSMakePoint(100.0, 50.0)];
[aPath closePath];
[aPath stroke];
return NSApplicationMain(argc, (const char **) argv);
}
any help would be appreciated
Many thanks
I'm trying to draw a line, but nothing appears - here is the source
#import <Cocoa/Cocoa.h>
#import <stdio.h>
int main(int argc, char *argv[])
{
NSBezierPath* aPath = [NSBezierPath bezierPath];
[aPath moveToPoint:NSMakePoint(0.0, 0.0)];
[aPath lineToPoint:NSMakePoint(100.0, 100.0)];
[aPath lineToPoint:NSMakePoint(100.0, 50.0)];
[aPath closePath];
[aPath stroke];
return NSApplicationMain(argc, (const char **) argv);
}
any help would be appreciated
Many thanks