Re: ScreenSaverView and Core Animation
Re: ScreenSaverView and Core Animation
- Subject: Re: ScreenSaverView and Core Animation
- From: Brian Williams <email@hidden>
- Date: Tue, 5 Feb 2008 12:21:42 -0800 (PST)
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 :)
_______________________________________________
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