On 26/10/2009, at 10:48 AM, I. Savant wrote:

Quincey's suggestion to cache is right on the money: draw it with bezier paths once, then only display the finished product as PDF data. You could even separate it out into different 'overlays' for each 'thread file'. That minimizes any redrawing that's necessary when changing the color of a 'thread file'.

I've found that caching to a PDF doesn't gain much performance wise - a little, but not that significant. Since a PDF essentially records whatever paths you create and rasterizes them, that's no surprise (it also has some limitation sin that it can't currently deal with gradients containing colours with < 1.0 alpha values). But caching to a bitmap of some kind is a much bigger win, provided you do it at the scale you need to draw it at (and recache if that scale changes). Using CGLayer can generate really big speedups, so that's worth looking into, but even the venerable NSBitmapImageRep is a good way to cache and easier to use than CGLayer.

 --Graham


_______________________________________________

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