-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCFilterGroup.h
executable file
·67 lines (45 loc) · 1.78 KB
/
SCFilterGroup.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
60
61
62
63
64
65
66
67
//
// SCFilterGroup.h
// SCRecorder
//
// Created by Simon CORSIN on 14/05/14.
// Copyright (c) 2014 rFlex. All rights reserved.
//
#import <Foundation/Foundation.h>
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
#import <CoreImage/CoreImage.h>
#else
#import <QuartzCore/QuartzCore.h>
#endif
#import "SCFilter.h"
@interface SCFilterGroup : NSObject<NSCoding>
// The list of SCFilter that this group contains
@property (readonly, nonatomic) NSArray *filters;
// Returns an array of the underlying Core Image Filters
@property (readonly, nonatomic) NSArray *coreImageFilters;
// The name of this filterGroup. Used for visual representations
@property (strong, nonatomic) NSString *name;
// Init with a single filter
- (id)initWithFilter:(SCFilter *)filter;
// Init with an array of filters
- (id)initWithFilters:(NSArray *)filters;
// Add a filter to the filterGroup
- (void)addFilter:(SCFilter *)filter;
// Remove a filter from the filterGroup
- (void)removeFilter:(SCFilter *)filter;
// Remove a filter at a specific index
- (void)removeFilterAtIndex:(NSUInteger)index;
// Returns a filter for a specific index
- (SCFilter *)filterForIndex:(NSUInteger)index;
// Write this filterGroup to a specific file.
// This filterGroup can then be restored from this file
- (void)writeToFile:(NSURL *)fileUrl error:(NSError **)error;
// Process the image using the underlying Core Image filters
- (CIImage *)imageByProcessingImage:(CIImage *)image;
+ (SCFilterGroup *)emptyFilterGroup;
+ (SCFilterGroup *)filterGroupWithFilter:(SCFilter *)filter;
+ (SCFilterGroup *)filterGroupWithFilters:(NSArray *)filters;
+ (SCFilterGroup *)filterGroupWithData:(NSData *)data;
+ (SCFilterGroup *)filterGroupWithData:(NSData *)data error:(NSError **)error;
+ (SCFilterGroup *)filterGroupWithContentsOfURL:(NSURL *)url;
@end