Skip navigation.
 
mlRe: ScreenSaverView and Core Animation
FROM : Brian Williams
DATE : Tue Feb 05 21:21:42 2008

I'll anwser my own question for the sake of the archives.

The problem was here

>[[NSImage imageNamed:@"water"]

drawInRect:NSRectFromCGRect(CGContextGetClipBoundingBox(context))
fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];

[NSImage imageNamed:@"water"} returns nil in the screen saver frame work
apparently. It worked fine when it was in a regular app.

so I changed it to use:

NSBundle *programBundle = [NSBundle bundleForClass:[self class]];
NSString *path = [programBundle pathForResource:@"water" ofType:@"jpg"];
NSImage  *backgroundImage = [[NSImage alloc] initWithContentsOfFile:path];

and it works. So no problem with CA, just my debugging skills :)

Related mailsAuthorDate
mlScreenSaverView and Core Animation Brian Williams Feb 5, 09:17
mlRe: ScreenSaverView and Core Animation Brian Christensen Feb 5, 10:26
mlRe: ScreenSaverView and Core Animation Scott Anguish Feb 5, 18:46
mlRe: ScreenSaverView and Core Animation Brian Williams Feb 5, 19:15
mlRe: ScreenSaverView and Core Animation Brian Williams Feb 5, 21:21