Re: Compositing Tricks?
Re: Compositing Tricks?
- Subject: Re: Compositing Tricks?
- From: Jerry LeVan <email@hidden>
- Date: Sun, 11 Jul 2004 17:53:07 -0400
I cobbled together a little app so I could try some zoomin' and fadin'
to see how it would look...
Code basically looks like:
*****************************************
-(void) performZoom
{
targetZoom = [theSlider floatValue];
zoomAmount = 0.1;
[theSlider setFloatValue:zoomAmount];
timer = [[NSTimer scheduledTimerWithTimeInterval:0.0025
target:self selector:@selector(zoomNextImage:)
userInfo: nil
repeats:YES] retain];
}
// Start with a small image and progressively draw larger...
-(void)zoomNextImage:(id)sender
{
float amt = [theSlider floatValue];
if(amt > targetZoom)
{
[timer invalidate];
[timer release];
[theSlider setFloatValue: targetZoom];
return;
}
amt = amt + 0.1;
[theSlider setFloatValue: amt]; // set how much to zoom the image
[self createScaledImage:theImage]; // build the image...
}
Code for the "fade in" is very similar.
Works ok for small images ( about the size of you hand ) but the bigger
images display sorta herky jerky. I have a 933 quicksiver.
Is there a clever way I can speed up the display or is NSImage basically
too "clunky"? (maybe a 3.0GHZ Dualie would help :)
Jerry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.