• 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: Drawing a tree with NSBezierPaths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing a tree with NSBezierPaths


  • Subject: Re: Drawing a tree with NSBezierPaths
  • From: Scott Ellsworth <email@hidden>
  • Date: Wed, 14 Sep 2005 11:14:25 -0700


On Sep 14, 2005, at 6:54 AM, Scott Thompson wrote:

On Sep 13, 2005, at 7:36 PM, Scott Ellsworth wrote:

I have a tree structure in memory, and I want to draw it on the screen. Each branch gets a line segment, and each junction gets a dot.

I just got bitten by the 'paths connect only if they are drawn consecutively, and only if the next segment starts where the last ended' design.

I don't understand the problem that you've "got bitten" by. You would expect that line segments would join even if their endpoints do not coincide?

Nope. I expected that if one line segment started where another ended, they would join even if there were intervening segments. that did not coincide.


Simple enough to fix - do one bezier for each leaf node, leading all the way back to the root, or do one bp consisting of disconnected line segments, and another with the joining dots that covers the unmitered joins.

I was hoping someone else had already solved the problem, since tree walkers are a bit of a pain to build and test, and often are performance nightmares if you mess them up. I implemented the second strategy, but I have not had the chance to throw really big trees at them.

Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Drawing a tree with NSBezierPaths (From: Scott Ellsworth <email@hidden>)
 >Re: Drawing a tree with NSBezierPaths (From: Scott Thompson <email@hidden>)

  • Prev by Date: Re: Transparent window misunderstood
  • Next by Date: Re: Core data model - binding question
  • Previous by thread: Re: Drawing a tree with NSBezierPaths
  • Next by thread: Bindings - An array of Dictionaries
  • Index(es):
    • Date
    • Thread