[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Outlandish graphics functionality sought?
Date: Wed, 26 Jul 89 16:07 PDT
From: barmar@Think.COM
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).
This will probably work if the superior(s) are windows, but won't
if the superior is the main screen (tv:main-screen). I thought of
this myself, and tried it out, but the only drawing commands
the main screen knows about are so low-level that I hung the
window system using them. Also, this won't work if the superior is
buried whenever its child pane is exposed, for the obvious reason.
________William R. Swanson_______\|/_
Traveler@ymir.Think.COM /|\
(617) 876-1111 Ext. 408