TexT TCL UTILITIES USER MANUAL TexT
SYNOPSIS
Draw a line
PACKAGE
TCLGPH
NAME
TexT
USAGE
TexT  wnID X Y Z Just Text Color {Ang} {Tag}
INPUT DEFINITIONS
wnID - The iD of the window to output the text in.
X - The start X coordinate of the text placement the meaning of which depends on Just
Y - The start Y coordinate of the text placement the meaning of which depends on Just
Z - The start Z coordinate of the text placement the meaning of which depends on Just. This variable is unused with the TK graphics driver but perhaps not with the VTK driver.
Just - The text justification. The possible options are right, center, and left. right starts the text at the location (X, Y, Z), center centers the text at (X, Y, Z), and left positions the text so that the last character is at (X, Y, Z).
Text - The text to output.
Color - The color of the text. This is an offset into the color table and must be between 0 and 255.
Ang - Optional input variable which specifies the angle the text is to be output at. Default is 0.0 degrees. NOTE: Tk does not provide for angled text and this input is currently ignored. Future versions of Tk may, however, provide for this feature.
Tag - Optional input variable which allows the text to have the designated Tag attached to it. Tagged items can be selectively deleted from a canvas.
RETURN DEFINITION
NONE
DESCRIPTION
TexT outputs text at the location (X, Y, Z) in the color Color. The text will be started, centered, or end at the location specified depending on if Just is set to right, center, or left respectively. Text cannot currently be output at any angle other than 0 degrees (horizontal). Text is output with the characteristics set in the last call to TextProp.
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 SWAP

# ESTABLISH a graphics window coverting the whole canvas 

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

# SET up Utopia 14 point text.

TextProp 14 Utopia 

# DRAW a vertical line which we will align the text to.

PlotColor HOLD $GphInfo(Purple) OFF
Line 0 0.0 -6.0 0.0 0.0 6.0 0.0

# OUTPUT right, centered, and left justified text in different colors

TexT 0 0.0 1.0 0.0 right "Right Justified Text" $GphInfo(White)
TexT 0 0.0 0.0 0.0 center "Centered Text" $GphInfo(Red)
TexT 0 0.0 -1.0 0.0 left "Left Justified Text" $GphInfo(Green)
      
Feb 22, 2007