Re: Make a solid line look like 3D
Re: Make a solid line look like 3D
- Subject: Re: Make a solid line look like 3D
- From: Quincey Morris <email@hidden>
- Date: Sun, 25 Oct 2009 17:21:06 -0700
On Oct 25, 2009, at 17:00, Graham Cox wrote:
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
Could well be, though it depends on whether PDF creation or rendering
has any path optimizations built in.
I'm still guessing, but I think the big win in terms of performance --
before going to something like image caching -- is going to be:
a. Use NSBezierPath immutably. (Mutating NSBezierPath objects seems a
*much* less common case, so I suspect the immutable cases are likely
better optimized in the frameworks.)
b. Coalesce paths with the same drawing characteristics into a single
NSBezierPath object, and keep such objects around (regenerating them
only when edits are made). Unfortunately, the desired drawing order
makes this a bit more complicated and less effective, but if we're
talking about representing stitches made with a continuous length of
thread, then it's likely that drawing order and drawing
characteristics are fairly tightly linked. Also, it's really triple
NSBezierPath objects, not single ones, because the whole point is to
draw each thread with 3 paths, and that has drawing-order implications
as well.
_______________________________________________
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