| WinClip | TCL UTILITIES USER MANUAL | WinClip |
|---|
| WinClip  |
|
| wnID | - | The id of the window where clipping is to be activated or deactivated. | |||||||||
| CmD | - | The clipping command. This must
be one of:
|
# 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.2 0.2 0.0 0.8 0.8 0.0 -6.0 -6.0 0.0 6.0 6.0 0.0
# OUTLINE the window in purple
PlotColor HOLD $GphInfo(Purple) OFF
Box 0 -6.0 -6.0 0.0 6.0 6.0 0.0
# RED Line and box with clipping off
PlotColor HOLD $GphInfo(Red) OFF
Line 0 -7.0 0.0 0.0 7.0 0.0 0.0
Box 0 3.0 3.0 0.0 7.0 7.0 0.0
# GREEN line and box clipping 1 pixel inside the window boundary. Lines
# extend up to but not on the purple boundary.
WinClip 0 AT
PlotColor HOLD $GphInfo(Green) OFF
Line 0 -7.0 1.0 0.0 7.0 1.0 0.0
Box 0 -3.0 -3.0 0.0 -7.0 -7.0 0.0
# Yellow line and box clipping at the window boundary. Lines extend onto
# the purple boundary but don't cross it.
WinClip 0 ON
PlotColor HOLD $GphInfo(Yellow) OFF
Line 0 -7.0 -1.0 0.0 7.0 -1.0 0.0
Box 0 3.0 -3.0 0.0 7.0 -7.0 0.0
| Feb 27, 2007 |
|---|