| Line | |
|---|
| 1 | |
|---|
| 2 | #import <Cocoa/Cocoa.h> |
|---|
| 3 | #import <QuartzCore/CoreImage.h> |
|---|
| 4 | |
|---|
| 5 | @interface SampleCIView: NSOpenGLView |
|---|
| 6 | { |
|---|
| 7 | CIContext *_context; |
|---|
| 8 | CIImage* _image; |
|---|
| 9 | NSRect _lastBounds; |
|---|
| 10 | CGRect _cleanRect; |
|---|
| 11 | CGSize _displaySize; |
|---|
| 12 | } |
|---|
| 13 | |
|---|
| 14 | - (void)setImage:(CIImage*)image; |
|---|
| 15 | - (void)setImage:(CIImage*)image dirtyRect:(CGRect)r; |
|---|
| 16 | - (void)setCleanRect:(CGRect)cleanRect; |
|---|
| 17 | - (void)setDisplaySize:(CGSize)displaySize; |
|---|
| 18 | |
|---|
| 19 | - (CIImage*)image; |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | - (void)viewBoundsDidChange:(NSRect)bounds; |
|---|
| 23 | |
|---|
| 24 | @end |
|---|
| 25 | |
|---|
| 26 | @interface NSObject (SampleCIViewDraw) |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | - (void)drawRect:(NSRect)bounds inCIContext:(CIContext *)ctx; |
|---|
| 30 | |
|---|
| 31 | @end |
|---|