Applying a Core Image filter to a PDFView, WebView or any view
Applying a Core Image filter to a PDFView, WebView or any view
- Subject: Applying a Core Image filter to a PDFView, WebView or any view
- From: Uwe Dauernheim <email@hidden>
- Date: Wed, 21 Oct 2009 18:29:41 +0200
Hej,
I tried to apply the following CIFilter to a pdfview, webview and/or a
simple view. I don't get any compiling errors, but it just nothing
happens. Am I missing a certain initialization part?
#import <Quartz/Quartz.h>
#import <QuartzCore/CAAnimation.h>
#import <QuartzCore/CoreImage.h>
...
{
NSArray *filters = nil;
CIFilter *filter = [CIFilter filterWithName:@"CIPointillize"];
[filter setDefaults];
[filter setValue:[NSNumber numberWithFloat:4.0] forKey:@"inputRadius"];
filters = [NSArray arrayWithObject:filter];
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:1.5];
[[webView animator] setContentFilters:filters]; // (a)
[[pdfView animator] setContentFilters:filters]; // (b)
[[view animator] setContentFilters:filters]; // (c)
[NSAnimationContext endGrouping];
}
\\\Uwe
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden