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: Graham Cox <email@hidden>
- Date: Mon, 20 Jun 2011 16:59:26 +1000
On 20/06/2011, at 4:47 PM, Matthias Arndt wrote:
> another idea is to cache the last output in a bitmap, redraw it in the next iteration, and update the cache after resizing. But I'll look into this only if a simple redraw won't be sufficient:
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.
--Graham_______________________________________________
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