Hi Graham,

Am 20. Jun 2011 um 02:24 schrieb Graham Cox <graham....@bigpond.com>:

> Your (4) is looking like the best approach - use a timer to schedule a 
> periodic update of the view, and during that update, draw only some portion 
> of the content on top of what you've drawn already. That leaves the issue of 
> view resizing, which you'll need to take into account. You can get notified 
> when the view is resizing, and modify your update schedule to ensure that it 
> does what you want - typically, it will need to flag that the background 
> needs to be erased and that the objects need to be redrawn from the beginning.
 
Thank you so much for this detailled reply: First I appreciate the 
confirmation, that threading is a bad idea for this purpose, and the 
encouragement to look into CoreAnimation in *future* apps ... I'll proceed with 
the 4th approach: For not too complex graphics the performance is good enough 
even if redrawing all pathes in each step, currently I'm looking into skipping 
the first (already drawn) ones.

Only drawing the delta, and reacting on resizes looks promising (thanks for the 
code fragments) ... 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: POITROAE :-)

Regards, Matthias
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to