diff options
Diffstat (limited to 'src/osx/SelectBoxLayer.m')
-rw-r--r-- | src/osx/SelectBoxLayer.m | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/osx/SelectBoxLayer.m b/src/osx/SelectBoxLayer.m deleted file mode 100644 index c198ffa..0000000 --- a/src/osx/SelectBoxLayer.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// SelectBoxLayer.m -// TikZiT -// -// Created by Aleks Kissinger on 14/06/2010. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import "SelectBoxLayer.h" - - -@implementation SelectBoxLayer - -@synthesize active; - -- (id)init { - [super init]; - box = CGRectMake(0.0f, 0.0f, 0.0f, 0.0f); - active = NO; - return self; -} - -- (void)setSelectBox:(NSRect)r { - box = NSRectToCGRect(r); -} - -- (NSRect)selectBox { - return NSRectFromCGRect(box); -} - -- (void)drawInContext:(CGContextRef)context { - if (active) { - CGContextAddRect(context, box); - - CGContextSetRGBStrokeColor(context, 0.6, 0.6, 0.6, 1); - CGContextSetRGBFillColor(context, 0.8, 0.8, 0.8, 0.2); - CGContextSetLineWidth(context, 1); - - CGContextSetShouldAntialias(context, NO); - CGContextDrawPath(context, kCGPathFillStroke); - } -} - -+ (SelectBoxLayer*)layer { - return [[[SelectBoxLayer alloc] init] autorelease]; -} - -@end |