• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: performance of NSBezierPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performance of NSBezierPath


  • Subject: Re: performance of NSBezierPath
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 8 Apr 2002 14:24:31 -0700

The cost of drawing an NSBezierPath is a function of the number of times it intersects itself. In the case you describe, you might want to simply call [NSBezierPath strokeLineFromPoint:toPoint:], and not worry about getting strictly correct anti-aliased intersections.

A few weeks back, someone on the CG team explained to me that:

"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...."


-jcr


On Sunday, April 7, 2002, at 08:30 AM, ruediger schmidt wrote:

Hi,
just tested the performance of NSBezierPath because I'm thinking about a
graphic app where polygons with a lot of points ( up to 20000 ) will be common.
I did the testing with a NSBezierPaths with random points in the rang 0,200,0,300.
For paths with more then 1500 I had to wait more then 1 minute (G4, 400 MHz) and
even on a new dual G4 it was slow.
My question is: Did some one else had same results? Is there a pitfall witch causes
this poor performance? Is there a easy way to improve performance significantly beside using OpenGL witch gives good results?
If it's not my fault is there a chance that apple will fix this (bug)?

thanks
ruediger
_______________________________________________
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.


John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.

References: 
 >performance of NSBezierPath (From: email@hidden (ruediger schmidt))

  • Prev by Date: 2 Questions: Dock and Private Frameworks
  • Next by Date: How to stop the Cocoa mail flood?
  • Previous by thread: Re: performance of NSBezierPath
  • Next by thread: Looking for some NSCell/NSMatrix sample code.
  • Index(es):
    • Date
    • Thread