CVFilter are now properly created and applied

but can't be controlled from the gui (yet)
This commit is contained in:
xant
2010-06-14 23:21:38 +02:00
parent fa51e2706d
commit 2a520b4e84
5 changed files with 48 additions and 16 deletions

View File

@@ -134,7 +134,7 @@
Layer *fjLayer = cLayer->fj_layer();
FilterInstance *filt = fjLayer->filters.begin();
while (filt) {
NSTabViewItem *newItem = [[NSTabViewItem alloc] initWithIdentifier:(id)filt];
NSTabViewItem *newItem = [[NSTabViewItem alloc] initWithIdentifier:self];
[newItem setLabel:[NSString stringWithUTF8String:filt->name]];
if (newItem)
[activeFilters addTabViewItem:newItem];
@@ -157,10 +157,7 @@
NSLog(@"4-filters limit reached for layer %s", [layer name]);
return;
}
NSTabViewItem *newItem = [[NSTabViewItem alloc] initWithIdentifier:self];
[newItem setLabel:@""];
if (newItem)
[activeFilters addTabViewItem:newItem];
NSRect frame = NSMakeRect(0, 0, 100, 20);
NSView *container = [[NSView alloc] initWithFrame:[activeFilters frame]];
NSSlider *newSlider = [[NSSlider alloc] initWithFrame:frame];
@@ -199,7 +196,11 @@
return;
}
filt->apply(lay);
// NSString *filterName = [NSString stringWithFormat:@"CI%@", [[sender selectedItem] title]];
NSTabViewItem *newItem = [[NSTabViewItem alloc] initWithIdentifier:self];
[newItem setLabel:filterName];
if (newItem)
[activeFilters addTabViewItem:newItem];
[newItem release];
}
}