Re: How to redraw a view in slow-motion
Re: How to redraw a view in slow-motion
- Subject: Re: How to redraw a view in slow-motion
- From: Matthias Arndt <email@hidden>
- Date: Mon, 20 Jun 2011 09:49:11 +0200
Hi Graham, hi Uli,
guys, you're gems! Thanks for all the input. Currently it's too early to dive into some high sophisticated optimization, and with Graham's info I'm confident the view's back buffer will work for me.
Am 20. Jun 2011 um 08:59 schrieb Graham Cox <email@hidden>:
> The view is already doing this for you. Everything drawn in a view actually ends up in a bitmap - the window's back buffer. If you draw a subrange of your objects, the ones you've earlier drawn into the back buffer are still there. The only time you have to start over is when the view resizes, which is what the 'needsErase' flag is for in my example - the back buffer gets cleared effectively clearing your "cache". There's no reason to reinvent the drawing mechanism from scratch, it's just a duplication of effort.
Hopefully I find some time these days to implement more details of the animation based on NSTimer-triggered redraws: Currently it's only quick & dirty, but seems to do the trick. I'll keep you posted.
Thanks again, Mattes
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden