//  Created by Joe Becker on 3/7/05.
//  Copyright 2005 __MyCompanyName__. All rights reserved.

#import "DragRect.h"

@implementation DragRect

- initFrom:(NSRect)theRect;
{
	[super init];         // Init the NSObject superclass!
	
	myRect = theRect;
	
	start = NSMakePoint(0,0);
	end   = NSMakePoint(0,0);
	color = [ [NSColor blackColor] retain];
	lineType = SOLID_LINE;
	return self;
}

- (NSRect)bounds {
	return myRect;
}


- (void)stroke
{	
	[color set];
	switch (lineType) {
		case DASHED_LINE: 
		case TICKED_LINE:
		default:			
			[NSBezierPath strokeRect:myRect];
	}
}


@end
