• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Compositing Tricks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Compositing Tricks?
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Fullscreen application choices
  • Next by Date: Re: What's better a separate run loop or separate thread?
  • Previous by thread: Re: Compositing Tricks?
  • Next by thread: Re: Compositing Tricks?
  • Index(es):
    • Date
    • Thread