SUBCELL Name
SUBCELL
Author
Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
craigm@lheamail.gsfc.nasa.gov Purpose
Finds the position of a subwindow within a reference window.
Calling Sequence
sub = subcell(panel, refposition) Description
SUBCELL finds the position of a subwindow within another window.
This could be useful in cases where the position of one window is
specified relative to another one.
When plotting, one often wants to describe the position of the
plot box with respect to another box on the screen. In that
respect, the reference window can be thought of as a virtual
display, and the SUBPOS as virtual a position on that display.
The SUBCELL function transforms the relative coordinates of the
virtual position back to normal screen coordinates.
Inputs
SUBPOS - A four-element array giving the position of the
subwindow, *relative* to a reference window given by
POSITION. Given as [XS1, YS1, XS2, YS2], which describes
the lower left and upper right corners of the subwindow.
Each value is a number between zero and one, zero being
the lower/left and one being the upper/right corners of
the reference window.
POSITION - A four-element array giving the position of the
reference window on the screen. Equivalent to the
graphics keyword of the same name.
Optional Inputs
NONE
Input Keyword Parameters
MARGIN - If set, then a default value for SUBPOS is found using
the DEFSUBCELL function. Returns
The position of the subwindow, in normal coordinates.
Procedure
Example
See Also
DEFSUBCELL, SUBCELLARRAY
EXTERNAL SUBROUTINES:
DEFSUBCELL Modification History
Written, CM, 1997
Added copyright notice, 25 Mar 2001, CM