diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-05-07 13:21:59 +0200 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-05-07 13:21:59 +0200 |
commit | d7f0b3e19fddc89fd22692847e9d840023d2b7f3 (patch) | |
tree | 762f48cb637eef334cf7f6320fe13b7988bc53e3 /tikzit-old/src/osx/SelectBoxLayer.m | |
parent | b00c5250d7a56b6d20980d89cf331a114fdfdee0 (diff) |
GPLed
Diffstat (limited to 'tikzit-old/src/osx/SelectBoxLayer.m')
-rw-r--r-- | tikzit-old/src/osx/SelectBoxLayer.m | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tikzit-old/src/osx/SelectBoxLayer.m b/tikzit-old/src/osx/SelectBoxLayer.m deleted file mode 100644 index a7abe33..0000000 --- a/tikzit-old/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 { - if (!(self = [super init])) return nil; - 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]; -} - -@end |