| ShowScreen | TCL UTILITIES USER MANUAL | ShowScreen |
|---|
| ShowScreen  |
{ |
| UnUsed | - | Optional and currently unused input variable which is defaulted to 0. |
| FunC | - | Optional procedure name which will be executed just after resumption of graphics. The default setting is as null string ("") which indicates that there is no procedure to execute. |
set Home [file join $env(TCLTOOLS_HOME)]
source [ file join $Home TclToolInits.tcl ]
TclToolInits GUI GPH PLT UTILS UDF UDFDB UDFUTILS FFT
# PROCEDURE which draws a filled rectangle in graphics window 0
proc After { } {
global GphInfo
PlotColor HOLD $GphInfo(Black) $GphInfo(Black)
Box 0 -.1 -.1 0.0 .1 .1 0.0
PlotColor HOLD $GphInfo(Black) OFF
}
# 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
# SET up a graphics window on the canvas.
GenWindow 0 0.0 0.0 0.0 1.0 1.0 0.0 -1.0 -1.0 0.0 1.0 1.0 0.0
# DRAW a bunch of radial lines from the center in random colors.
# but pause after drawing half of them. Just before resuming
# graphics draw a filled rectangle centered in the window.
for { set A 0.0 } { $A < 360.0 } { set A [expr $A + 2.0] } {
if { $A == 180.0 } { ShowScreen 0 After }
set C [expr int([TUdataRnd1 V 1 P 254])]
PlotColor HOLD $C OFF
incr C
set X [expr .8 * cos ($A / $RtoD)]
set Y [expr .8 * sin ($A / $RtoD)]
Line 0 0.0 0.0 0.0 $X $Y 0.0
}
| Feb 22, 2007 |
|---|