Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!psuvax1!xavier!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Anyone got good arrow-generating code? Message-ID: Date: 23 Feb 90 16:43:20 GMT References: <24880@ut-emx.UUCP> Sender: news@xavier.swarthmore.edu (USENET News System) Reply-To: jackiw@cs.swarthmore.edu (Nick Jackiw) Distribution: usa Organization: Visual Geometry Project, Swarthmore College, PA Lines: 18 rdd@walt.cc.utexas.edu (Robert Dorsett) writes: > I'm looking for public domain code that will draw *good* arrow tips > (MacDraw-style barbed arrows) at the end of a line. Barring that, tips on how > to pull it off would be helpful. My current attempts all look rather awful. Rick Flott had a brief note in MacTutor Vol 1, No 9 (duplicated in _The Best of MacTutor: Volume I_, pp. 174+) on how to do this. Compute the slope, figure out the angle between arrowStart+arrowStop (use PtToAngle), then PaintArc a rectangle around the endPt using that angle (or 180 deg from that angle, I forget) as PaintArc's startAngle and twice the desired arrow width for PaintArc's arcAngle. -- _ _|\____ Nick Jackiw | Visual Geometry Project | Math Department / /_/ O> \ ------------+-------------------------+ Swarthmore College | O> | 215-328-8225| jackiw@cs.swarthmore.edu| Swarthmore PA 19081 \_Guernica_/ ------------+-------------------------+ USA