GenWindow TCL UTILITIES USER MANUAL GenWindow
SYNOPSIS
Open a rectangular graphics window
PACKAGE
TCLGPH
NAME
GenWindow
USAGE
GenWindow  wnID rX1 rY1 rZ1 rX2 rY2 rZ2 sX1 sY1 sZ1 sX2 sY2 sZ2 {Pix}
INPUT DEFINITIONS
wnID - The window iD.
rX1 - The position of the lower X edge of the window on the graphics canvas. The graphics canvas runs from 0.0 (bottom) to 1.0 (top).
rY1 - The position of the left Y edge of the window on the graphics canvas. The graphics canvas runs from 0.0 (left) to 1.0 (right).
rZ1 - The position of the nearer Z edge of the window on the graphics canvas. This is ignored in the TK driver but possibly not in the VTK driver.
rX2 - The position of the upper X edge of the window on the graphics canvas. The graphics canvas runs from 0.0 (bottom) to 1.0 (top).
rY1 - The position of the right Y edge of the window on the graphics canvas. The graphics canvas runs from 0.0 (left) to 1.0 (right).
rZ1 - The position of the deeper Z edge of the window on the graphics canvas. This is ignored in the TK driver but possibly not in the VTK driver.
sX1 - The value associated with the lower edge of the window.
sY1 - The value associated with the left edge of the window.
sZ1 - The value associated with the nearer edge of the window. This value is ignored in the TK driver but may not be in the VTK driver.
sX2 - The value associated with the upper edge of the window.
sY2 - The value associated with the right edge of the window.
sZ2 - The value associated with the deeper edge of the window. This value is ignored in the TK driver but may not be in the VTK driver.
Pix - Optional input variable which allows the window edges to be scaled from 0 to the number of screen pixels across the window. The default value is N which keeps the scaling set to the user selected values. To scale either the X or the Y axis alone in pixels set Pix to X or Y respectively. To scale both set Pix to XY.
RETURN DEFINITION
NONE
DESCRIPTION
GenWindow opens a rectangular graphics window on the current canvas bounded by the lower left-hand and upper right-hand corners (rX1, rY1, rZ1) and (rX2, rY2, rZ2) respectively. Scaling limits along the X and Y window axes are specified by (sX1, sY1, sZ1) and (sX2, sY2, sZ2). The scaling is defaulted to being LINEAR within the open procedure which can be later changed to LOG through the SetAxis procedure.
The window actually has two pair of X and Y axes. The bottom X and left Y window axis are designated the PRIMARY window axes and the top X and right Y are designated the SECONDARY window axes. GenWindow assigns both sets of axes the same limits. These can be changed (both the limits and the scaling) independently through SetAxis.
Graphics plotted in the window will be output against the currently active axes. This is defaulted to the PRIMARY axis when the window is opened but can be changed through the routine ActiveAxes to be any pair of the X,Y axes.
In an environment where there are multiple canvas's open, the graphics window is only correctly scaled on the canvas under which it was open. It will also be correctly scaled on all other canvas's which have the same pixel dimensions as the canvas under which it was created.
ERRORS
None Generated
C BACKING
No
EXAMPLE(S)
EXAMPLE 1:Establish 3 graphics windows on a canvas and outline them.
# INITIALIZE the default gui settings

GUIprefsRead

# SET a window size

set GphInfo(xsScrL) 600
set GphInfo(ysScrL) 500
set GphInfo(xScrL) 600
set GphInfo(yScrL) 500

# START graphics

GraphicsOn TK ETones SWAP

# ESTABLISH 3 graphics windows on the canvas

GenWindow 0 0.1 0.10 0.0 0.9 0.49 0.0 -8. 0. 0. 8.0 4. 0.
GenWindow 1 0.1 0.51 0.0 0.4 0.90 0.0 -8. 0. 0. 8.0 8. 0.
GenWindow 2 0.5 0.51 0.0 0.9 0.90 0.0 -8. 0. 0. 8.0 8. 0.

# SET the forground plotting color to white. (Since we reversed black
#   and white this will come out black)

PlotColor HOLD GohInfo(White) HOLD

# OUTLINE the graphics windows.

Box 0 -8.0 0.0 0.0 8.0 4.0 0.0
Box 1 -8.0 0.0 0.0 8.0 8.0 0.0
Box 2 -8.0 0.0 0.0 8.0 8.0 0.0
      
Feb 22, 2007