Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing a tree with NSBezierPaths




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

Hi, all.

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.

Before I write some tree walking code to do a depth first search, returning one BP for each walk down the tree, has someone already solved this?

I did google on NSBezierPath, tree, depth-first, as well as reading the docs and looking at the CocoaDev wiki.

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?


Scott

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Drawing a tree with NSBezierPaths (From: Scott Ellsworth <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.