[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Outlandish graphics functionality sought?
Date: Wed, 26 Jul 89 15:34 PDT
From: Robert D. Pfeiffer <RDP@ALAN.LAAC-AI.Dialnet.Symbolics.COM>
I'd like to be able to draw lines and arrows where the first endpoint's
coordinates are specified relative to one window pane, and the second
endpoint's coordinates are specified relative to another window pane.
What you need to do is find a common ancestor of the two windows (if they're both panes of the
same frame, then this is simply either one's :SUPERIOR), convert pane-relative coordinates to
ancestor-relative coordinates, and then draw the arrow in the ancestor. There are messages to
windows that will tell you the offset of the window's top-left corner in its superior, so you
can use this to compute the offset you need to apply to pane-relative coordinates (if you have
to go back several window generations to find the common ancestor then you'll have to sum these
offsets).