1 #import <QuartzCore/CIFilter.h>
2 #import <QuartzCore/CIImage.h>
3 #import <AppKit/NSRaise.h>
4 #import <Foundation/NSDictionary.h>
6 @interface CIImage(private)
7 -(void)setFilter:(CIFilter *)filter;
10 @implementation CIFilter
12 -initWithName:(NSString *)name {
13 _keyValues=[NSMutableDictionary new];
14 [_keyValues setObject:name forKey:@"kCIAttributeFilterName"];
23 +(CIFilter *)filterWithName:(NSString *)name {
24 return [[[self alloc] initWithName:name] autorelease];
28 // NSUnimplementedMethod();
31 -(void)setValue:value forKey:(NSString *)key {
33 [_keyValues setObject:value forKey:key];
35 [_keyValues removeObjectForKey:key];
38 -valueForKey:(NSString *)key {
39 if([key isEqual:@"outputImage"]){
40 CIImage *image=[CIImage emptyImage];
42 [image setFilter:self];
46 return [_keyValues objectForKey:key];