• 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: [RePost] NSBezierPath currentPoint
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RePost] NSBezierPath currentPoint


  • Subject: Re: [RePost] NSBezierPath currentPoint
  • From: Alex Eddy <email@hidden>
  • Date: Tue, 3 Feb 2004 22:30:14 -0800

On Feb 3, 2004, at 10:00 PM, Jens Bauer wrote:
On Wednesday, Feb 4, 2004, at 04:13 Europe/Copenhagen, Andersen Studley wrote:
which makes me wonder why I have to do :
//other stuff
[path moveToPoint:[path currentPoint]]; //WHY?
[path lineToPoint:myPoint];
[path moveToPoint:[path currentPoint]]; //WHY?
[path lineToPoint:myOtherPoint];

instead of :
[path lineToPoint:myPoint];
[path lineToPoint:myOtherPoint];


I think it's because the first one would be much faster.

I personally only do this:

loop
{
[path moveToPoint:...];
[path lineToPoint:...];
[path stroke];
[path removeAllPoints];
}

-That seems to be the fastest way for me.

Appending lines all the time will make rendering slower.
You can search the archive for information on it; I think John Randolph
answered the question a few years ago...



Be careful, drawing one path segment at a time produces subtly different results than drawing the segments as one connected path. By default Quartz figures out the intersections of the path for you, which is slow, but produces correct results where two translucent paths overlap, or edges of two antialiased paths touch. It will also miter or join the segments correctly.

If you don't care so much about the visual details (and there are plenty of valid cases where speed is more important!) then drawing one path segment at a time is fine. But if speed is really important then write your own path class in OpenGL, using texturing hardware to do the antialiasing for you.
_______________________________________________
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.
  • Prev by Date: Re: Cocoa/Windows parallel dvlpmt
  • Next by Date: Can't anyone help me with PopUp Menus?
  • Previous by thread: Re: [RePost] NSBezierPath currentPoint
  • Next by thread: Can't anyone help me with PopUp Menus?
  • Index(es):
    • Date
    • Thread