• 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: Best way to animate series of images in 10.4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to animate series of images in 10.4


  • Subject: Re: Best way to animate series of images in 10.4
  • From: Jacob Fraimow <email@hidden>
  • Date: Thu, 17 Nov 2005 18:46:15 -0500

why not have a NSImageView with a GIF of your animation in it and flip setAnimates: depending on when it should be in progress or not? That seems like it would be the easiest solution, albeit somewhat limited.

$0.02


On Nov 17, 2005, at 6:34 PM, Rhon Fitzwater wrote:

So it would be better to create a single image with all the frames included? How much more efficient would this be over creating an animating with say 10 separate images.

Thanks,
-Rhon
On Nov 17, 2005, at 6:26 PM, Ricky Sharp wrote:


On Nov 17, 2005, at 5:05 PM, Rhon Fitzwater wrote:

The goal of this is to create in some sense, a custom progress indicator. When my program is doing something, instead of using the supplied progress indicators, I want to use the custom animation from my images.

What's commonly done in this situation is to have a single image which contains all your 'frames'. Then, whenever your indicator needs to update itself, just compute the new frame index and use that to determine the source image bounds.


Here's a small piece of code from a tiled-graphic object:


NSRect theTileRect = NSMakeRect (theColumn * theTileSize.width, theRow * theTileSize.height,
theTileSize.width, theTileSize.height);

[theImage drawInRect:theDestinationRect fromRect:theTileRect
operation:NSCompositeSourceOver fraction:1.0];


where theTileSize (NSSize) is the dimensions of an individual tile (frame)
where theColumn and theRow are 0-based indecies


___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Best way to animate series of images in 10.4
      • From: Rhon Fitzwater <email@hidden>
    • Re: Best way to animate series of images in 10.4
      • From: Colin Barrett <email@hidden>
References: 
 >Best way to animate series of images in 10.4 (From: Rhon Fitzwater <email@hidden>)
 >Re: Best way to animate series of images in 10.4 (From: John Stiles <email@hidden>)
 >Re: Best way to animate series of images in 10.4 (From: Rhon Fitzwater <email@hidden>)
 >Re: Best way to animate series of images in 10.4 (From: Ricky Sharp <email@hidden>)
 >Re: Best way to animate series of images in 10.4 (From: Rhon Fitzwater <email@hidden>)

  • Prev by Date: Re: Best way to animate series of images in 10.4
  • Next by Date: Re: Best way to animate series of images in 10.4
  • Previous by thread: Re: Best way to animate series of images in 10.4
  • Next by thread: Re: Best way to animate series of images in 10.4
  • Index(es):
    • Date
    • Thread