Re: NSBezierPath alloc
Re: NSBezierPath alloc
- Subject: Re: NSBezierPath alloc
- From: "John C. Randolph" <email@hidden>
- Date: Tue, 26 Feb 2002 17:36:35 -0800
On Tuesday, February 26, 2002, at 10:49 AM, Developer wrote:
>
OK...I take it back. It's not the allocating. It's the stroke
>
command.
>
Anybody have any suggestions to optimize the drawing. It will
>
always be
>
straight lines. I have redone this using the
>
strokeLineFromPoint function.
>
This does make it much faster but doesn't give me any of the
>
nice stuff you
>
get when the path is stored.
Well, it's like this..
The cost of rendering an NSBezierPath is a function of the
number of times the path intersects itself. When I asked about
this internally, I was told:
>
Drawing 1000 individual moveto/lineto segments is essentially
>
equivalent to drawing 1000 independent thin rectangles of
>
various lengths at various orientations. Drawing a 1000
>
segment connected/stroked path with round linejoins involves
>
parallel curve formation (including arc line joins), flattening
>
the curves, feeding the entire beast to the scan converter as
>
a huge self-intersecting polygon, resolving the
>
self-intersections to get the antialiasing right, etc....
>
>
The team is looking at this issue, but it seems like for
>
performance sensitive applications, rendering the individual
>
segments will always be much faster...
Hope this helps,
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.