-
Notifications
You must be signed in to change notification settings - Fork 0
/
nnDrawView.h
61 lines (40 loc) · 1.3 KB
/
nnDrawView.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// nnDrawView.h
//
// Created by Brice Tebbs on 3/5/10.
// Copyright northNitch Studios Inc. 2010. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "northNitch.h"
#import "nnSceneObject.h"
#import "nnRateCounter.h"
@protocol nnDrawViewInteractionDelegate
- (void)touchUpPoints:(NSArray *)points; // Should have a better name
@optional
- (void)touchIsAt:(CGPoint) p;
@end
@interface nnDrawView : UIView {
NSMutableArray *dragPoints;
CFTimeInterval startTime;
BOOL inTouches;
// Actual data objects to create/draw
nnSceneObject *currentSceneObject;
nnRateCounter *frameRate;
NSMutableArray *scene; // Array of scene objects
id <nnDrawViewInteractionDelegate> interactDelegate;
CFDataRef backData;
}
-(void) setup;
-(void) dealloc;
-(IBAction)createBackData;
-(UInt32)pixelAtPoint:(CGPoint)p;
-(void)loadKernelOfWidth:(NSInteger)width into: (UInt32*)key at: (CGPoint)p;
-(void)drawOverlaysInContext: (CGContextRef)context;
-(void) addSceneObjectPart: (nnSceneObjectPart*) part;
-(IBAction)clearSceneInfo;
-(IBAction)renderToImage;
@property (nonatomic, assign) id <nnDrawViewInteractionDelegate> interactDelegate;
@property (nonatomic, retain) NSMutableArray *dragPoints;
@property CFTimeInterval startTime;
@end