• 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: Ricky Sharp <email@hidden>
  • Date: Thu, 17 Nov 2005 17:26:01 -0600


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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Best way to animate series of images in 10.4
      • From: Rhon Fitzwater <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>)

  • 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