|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
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 :)
| References: | |
| >Re: Compositing Tricks? (From: Jerry LeVan <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.