CompuServe Messages

QD Geometry

    14-Mar-94 02:13:41
Sb: QD Geometry
Fm: Patrick D. Parker 71260,3711
To: All
Given 2 points in global QuickDraw coordinates (originPt, terminalPt), I would like to draw an arrow. For a simple line, I would do the following: MoveTo(originPt.h, originPt.v); LineTo(terminalPt.h, terminalPt.v); Getting the correct angle in QuickDraw coordinates for the "head" is what I'm wondering about… The terminalPt is the origin for the "head", whose angles should be 40 degrees from the main line; the "length" of the head lines should be about one fifth as long as the main line. In "ASCII art", the lines would look something like this: <— —> /\ | | | /\ / / / Horizontal and vertical arrows are not a problem; I'm just wondering what the best way is to handle drawing when the arrow is not horizontal or vertical. Do I need to resort to trig. functions, or is there a better way? Thanks for any help, Patrick