-
Notifications
You must be signed in to change notification settings - Fork 0
/
CAppDelegate.m
35 lines (25 loc) · 895 Bytes
/
CAppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// CAppDelegate.m
// GLFilter_OSX
//
// Created by Jonathan Wight on 2/21/12.
// Copyright (c) 2012 toxicsoftware.com. All rights reserved.
//
#import "CAppDelegate.h"
#import "CHelloWorld.h"
@interface CAppDelegate ()
@property (readwrite, nonatomic, strong) IBOutlet NSImageView *imageView;
@end
@implementation CAppDelegate
@synthesize window = _window;
@synthesize imageView = _imageView;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
CHelloWorld *theSomething = [[CHelloWorld alloc] init];
CGImageRef theCGImage = [theSomething run];
NSBitmapImageRep *theBitmapImageRep = [[NSBitmapImageRep alloc] initWithCGImage:theCGImage];
NSImage *theImage = [[NSImage alloc] initWithSize:(NSSize){ CGImageGetWidth(theCGImage), CGImageGetHeight(theCGImage) }];
[theImage addRepresentation:theBitmapImageRep];
self.imageView.image = theImage;
}
@end