| LineStyle | TCL UTILITIES USER MANUAL | LineStyle |
|---|
| LineStyle  |
{ |
| Width | - | An optional input which specifies the line width in pixels. Default is 0 which will produce the minimum line width. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lStyle | - | An optional input which specifies
the current line style. This can also set in the
PlotColor procedure. The default value is SOLID. The
recognized inputs are:
|
In addition to the above hard coded patterns, lsytle may
also contain a user defined line style.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| aEnds | - | An optional input which specifies if and where arrows should be added to the line ends. The default value is "" which is the same as none but results without the specification being added to the line command. The input must be either none, first, last or both for no arrows on the lines, arrow on the leading point point of the line, arrow on the ending point of the line or arrows on both points of the line repectively. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| aShape | - | An optional input which is used only when aEnds is not none> or "". The input specifies how the arrow is to be formed. The default is "" which used the generic settings in Tk. To set the characteristics yourself the input must be "{o l w}" where l is the arrow length, w the arrow witdh, and o is the overlap distance of the arrow and the line. All values are in pixels. |
# 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 1.0 -6.0 -6.0 0.0 6.0 6.0 0.0
# SET the text size to 10
TextProp 10 HOLD HOLD
# Line color to white
PlotColor HOLD $GphInfo(White) HOLD
# OUTPUT lines of different line styles and thicknesses and label them
LineStyle 1 DASH1
Line 0 -6.0 5.0 0.0 2.5 5.0 0.0
TexT 0 3.0 5.0 0.0 right DASH1 $GphInfo(White)
LineStyle 1 DASH2
Line 0 -6.0 4.5 0.0 2.5 4.5 0.0
TexT 0 3.0 4.5 0.0 right DASH2 $GphInfo(White)
LineStyle 1 DASH1
Line 0 -6.0 4.0 0.0 2.5 4.0 0.0
TexT 0 3.0 4.0 0.0 right DASH3 $GphInfo(White)
LineStyle 1 DASH4
Line 0 -6.0 3.5 0.0 2.5 3.5 0.0
TexT 0 3.0 3.5 0.0 right DASH4 $GphInfo(White)
LineStyle 2 SPDASH1
Line 0 -6.0 3.0 0.0 2.5 3.0 0.0
TexT 0 3.0 3.0 0.0 right SPDASH1 $GphInfo(Red)
LineStyle 2 SPDASH2
Line 0 -6.0 2.5 0.0 2.5 2.5 0.0
TexT 0 3.0 2.5 0.0 right SPDASH2 $GphInfo(Red)
LineStyle 2 SPDASH3
Line 0 -6.0 2.0 0.0 2.5 2.0 0.0
TexT 0 3.0 2.0 0.0 right SPDASH3 $GphInfo(Red)
LineStyle 2 SPDASH4
Line 0 -6.0 1.5 0.0 2.5 1.5 0.0
TexT 0 3.0 1.5 0.0 right SPDASH4 $GphInfo(Red)
LineStyle 3 DASHDOT1
Line 0 -6.0 1.0 0.0 2.5 1.0 0.0
TexT 0 3.0 1.0 0.0 right DASHDOT1 $GphInfo(Green)
LineStyle 3 DASHDOT2
Line 0 -6.0 0.5 0.0 2.5 0.5 0.0
TexT 0 3.0 0.5 0.0 right DASHDOT2 $GphInfo(Green)
LineStyle 3 DASHDOT3
Line 0 -6.0 0.0 0.0 2.5 0.0 0.0
TexT 0 3.0 0.0 0.0 right DASHDOT3 $GphInfo(Green)
LineStyle 4 DASH2DOT1
Line 0 -6.0 -0.5 0.0 2.5 -0.5 0.0
TexT 0 3.0 -0.5 0.0 right DASH2DOT1 $GphInfo(Cyan)
LineStyle 4 DASH2DOT2
Line 0 -6.0 -1.0 0.0 2.5 -1.0 0.0
TexT 0 3.0 -1.0 0.0 right DASH2DOT2 $GphInfo(Cyan)
LineStyle 4 DASH2DOT3
Line 0 -6.0 -1.5 0.0 2.5 -1.5 0.0
TexT 0 3.0 -1.5 0.0 right DASH2DOT3 $GphInfo(Cyan)
LineStyle 5 DASHSPDOT1
Line 0 -6.0 -2.0 0.0 2.5 -2.0 0.0
TexT 0 3.0 -2.0 0.0 right DASHSPDOT1 $GphInfo(Blue)
LineStyle 5 DASHSPDOT2
Line 0 -6.0 -2.5 0.0 2.5 -2.5 0.0
TexT 0 3.0 -2.5 0.0 right DASHSPDOT2 $GphInfo(Blue)
LineStyle 5 DASHSPDOT3
Line 0 -6.0 -3.0 0.0 2.5 -3.0 0.0
TexT 0 3.0 -3.0 0.0 right DASHSPDOT3 $GphInfo(Blue)
LineStyle 6 "{_....}"
Line 0 -6.0 -3.5 0.0 2.5 -3.5 0.0
TexT 0 3.0 -3.5 0.0 right "USER DEFINED" $GphInfo(Yellow)
# DRAW some lines with arrows in yellow
PlotColor HOLD $GphInfo(Yellow) OFF
LineStyle 1 SOLID both
Line 0 -5.0 -4.5 0.0 -1.0 -4.5 0.0
LineStyle 1 HOLD first
Line 0 -5.0 -5.0 0.0 -1.0 -5.0 0.0
LineStyle 1 HOLD last
Line 0 -5.0 -5.5 0.0 -1.0 -5.5 0.0
LineStyle 1 SOLID both "{3 10 8}"
Line 0 1.0 -4.5 0.0 5.0 -4.5 0.0
LineStyle 1 HOLD first "{8 18 4}"
Line 0 1.0 -5.0 0.0 5.0 -5.0 0.0
LineStyle 1 HOLD last "{20 14 4}"
Line 0 1.0 -5.5 0.0 5.0 -5.5 0.0
| Feb 15, 2007 |
|---|