Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Canvas.h
- Canvas.m
- -(NSBezierPath *)createPath:(NSRect) aRect
- {
- NSBezierPath * tempPath;
- //I need to know what tool
- switch(0){ //temporary - this would use the toolType as a selector
- case 0:
- tempPath = [NSBezierPath bezierPathWithOvalInRect:aRect];
- break;
- case 1:
- tempPath = [NSBezierPath bezierPathWithRect:aRect];
- break;
- default:
- tempPath = [NSBezierPath bezierPathWithOvalInRect:aRect];
- break;
- }
- return tempPath;
- }
- -(NSBezierPath *)createPath:(NSRect) aRect
- {
- NSBezierPath * tempPath;
- //I need to know what tool
- switch(0){ //temporary - this would use the toolType as a selector
- case 0:
- tempPath = [NSBezierPath bezierPathWithOvalInRect:aRect];
- break;
- case 1:
- tempPath = [NSBezierPath bezierPathWithRect:aRect];
- break;
- default:
- tempPath = [NSBezierPath bezierPathWithOvalInRect:aRect];
- break;
- }
- return tempPath;
- }
- -(void)init {
- [super init];
- //set default color = black
- toolColor.rd=1.0;
- toolColor.grn=1.0;
- toolColor.blu=1.0;
- toolColor.alp=1.0;
- //set default size
- toolSize=0.8;
- //set default toolType
- toolType=0;
- //oval
- NSLog(@"Init %@",self);
- }
- -(id)init {
- if (self = [super init]) {
- //set default color = black
- toolColor.rd=1.0;
- toolColor.grn=1.0;
- toolColor.blu=1.0;
- toolColor.alp=1.0;
- //set default size
- toolSize=0.8;
- //set default toolType
- toolType=0;
- //oval
- NSLog(@"Init %@",self);
- }
- return self;
- }
Add Comment
Please, Sign In to add comment