Box TCL UTILITIES USER MANUAL Box
SYNOPSIS
Draw a rectangle
PACKAGE
TCLGPH
NAME
Box
USAGE
Box  wnID Xa Ya Za Xb Yb Zb {Tag}
INPUT DEFINITIONS
wnID - The iD of the window to output the rectangle in.
Xa - The X coordinate of the corner A in the rectangle.
Ya - The Y coordinate of the corner A in the rectangle.
Za - The Z coordinate of the corner A in the rectangle. This is unused with the TK graphics driver but perhaps not with the VTK driver.
Xb - The X coordinate of the corner B in the rectangle which is diagonally opposite corner A.
Yb - The Y coordinate of the corner B in the rectangle which is diagonally opposite corner A.
Zb - The Z coordinate of the corner B in the rectangle which is diagonally opposite corner A. This is unused with the TK graphics driver but perhaps not with the VTK driver.
Tag - Optional input variable which allows the box to have the designated Tag attached to it. Tagged items can be selectively deleted from a canvas.
RETURN DEFINITION
NONE
DESCRIPTION
Box draws a rectangle which has dialgonal corners at the coordinates (Xa, Ya, Za) and (Xb, Yb, Zb) in the color and linestyle set in the last call to PlotColor and LineStyle.
The rectangle is drawn open or filled depending on the status of the current fill color. The the current fill color is set to OFF the rectangle consists of just the outline.
ERRORS
None Generated
C BACKING
No
EXAMPLE(S)
EXAMPLE 1:Examples of various lines.
# 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 RainBow 

# ESTABLISH a graphics window coverting the whole canvas 

GenWindow 0 0.0 0.0 0.0 1.0 1.0 0.0 -6.0 -6.0 0.0 6.0 6.0 0.0

# DRAW a purple unfilled rectangle

PlotColor HOLD $GphInfo(Purple) OFF
Box 0 2.0 3.0 0.0 4.0 5.0 0.0 

# DRAW a green filled rectangle

PlotColor HOLD $GphInfo(Green) $GphInfo(Green)
Box 0 -4.0 -3.0 0.0 -1.0 5.0 0.0 

# DRAW a blue dashed rectangle with arrows

LineStyle 1 DASH1 both
PlotColor HOLD $GphInfo(Blue) OFF
Box 0 4.0 -4.0 0.0 5.0 0.0 0.0 

# DRAW a red dashed rectangle with fat lines

LineStyle 4 SOLID none
PlotColor HOLD $GphInfo(Red) OFF
Box 0 0.0 -3.0 0.0 2.0 2.0 0.0 
      
Feb 28, 2007