| SetScreen | TCL UTILITIES USER MANUAL | SetScreen |
|---|
| SetScreen  |
|
| canvasID | - | The current canvas iD. If no canvas has been created with this iD the routine will create one. |
| Canvas | - | Optional input variable which informs the device initialization routine not to open a canvas but to use one which has been externally opened. The default setting is NONE which causes the routine to create a graphics canvas when invoked. To use an externally created canvas enter the canvas window name here. |
# 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 but don't create a canvas
GraphicsOn TK ETones NOSWAP NONE OMIT
# SET a blue background and initialize the canvas
BackGround $GphInfo(Blue)
SetScreen 0
# SET a long narrow window
set GphInfo(xsScrL) 600
set GphInfo(ysScrL) 200
set GphInfo(xScrL) 600
set GphInfo(yScrL) 200
# SET a green background and initialize a second canvas
BackGround $GphInfo(Green)
SetScreen 1
# SET current line color to red
PlotColor HOLD $GphInfo(Red) OFF
# PUT canvas 0 as the current canvas, create a graphics window and outline
# the window
SetScreen 0
GenWindow 0 .25 .25 0.0 .75 .75 0.0 0.0 0.0 0.0 1.0 1.0 0.0
Box 0 0.0 0.0 0.0 1.0 1.0 0.0
# PUT canvas 0 as the current canvas, create a graphics window and outline
# the window
SetScreen 1
GenWindow 2 .25 .25 0.0 .75 .75 0.0 0.0 0.0 0.0 1.0 1.0 0.0
Box 2 0.0 0.0 0.0 1.0 1.0 0.0
# Outline window 2 on canvas 0 in white to see where it is
SetScreen 0
PlotColor HOLD $GphInfo(White) OFF
Box 2 0.0 0.0 0.0 1.0 1.0 0.0
| Feb 26, 2007 |
|---|