diff options
author | Gard Spreemann <gspreemann@gmail.com> | 2018-10-23 16:35:21 +0200 |
---|---|---|
committer | Gard Spreemann <gspreemann@gmail.com> | 2018-10-23 16:35:21 +0200 |
commit | 30dcb0a5460c0d364907fdcc10beeb8aabc78106 (patch) | |
tree | 49feb8753359b41a83e4bbde424ab09f4799838e /tikzit/src/osx/SelectBoxLayer.m | |
parent | c220b6e1264822c6f8d97ab216a319261106e614 (diff) | |
parent | 43233c4f76c5a96c08dcb033372294fbafbaf663 (diff) |
Merge tag 'v2.0' into debian/sid
Diffstat (limited to 'tikzit/src/osx/SelectBoxLayer.m')
-rw-r--r-- | tikzit/src/osx/SelectBoxLayer.m | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tikzit/src/osx/SelectBoxLayer.m b/tikzit/src/osx/SelectBoxLayer.m deleted file mode 100644 index c198ffa..0000000 --- a/tikzit/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 |