NAME
TkGetDash - convert from string to valid dash structure.
SYNOPSIS
##iinncclluuddee <
int TTkkGGeettDDaasshh(interp, string, dashPtr) AARRGGUUMMEENNTTSS TclInterp *interp(in) Interpreter to use for error reporting. CONST char * string(in) Textual value to be converted.> TkDash *dashPtr (out) Points to place to store the dash pat-
tern value converted from string.DESCRIPTION
These procedure parses the string and fills in the result in the TkDash structure. The string can be a list of integers or a characterstring containing only [[..,,-]] or spaces. If all goes well, TCLOK is
returned. If string doesn't have the proper syntax then TCLERROR is
returned, an error message is left in the interpreter's result, and nothing is stored at *dashPtr.The first possible syntax is a list of integers. Each element repre-
sents the number of pixels of a line segment. Only the odd segments aredrawn using the "outline" color. The other segments are drawn transpar-
ent.The second possible syntax is a character list containing only 5 possi-
ble characters [[..,,- ]]. The space can be used to enlarge the space
between other line elements, and can not occur as the first posibion in the string. Some examples:-dash . = -dash {2 4}
-dash - = -dash {6 4}
-dash -. = -dash {6 4 2 4}
-dash -.. = -dash {6 4 2 4 2 4}
-dash {. } = -dash {2 8}
-dash , = -dash {4 4}
The main difference of this syntax with the previous is that it itshape-conserving. This means that all values in the dash list will be
multiplied by the line width before display. This assures that "." willalways be displayed as a dot and "-" always as a dash regardless of the
line width. On systems where only a limited set of dash patterns, the dash pattern will be displayed as the most close dash pattern that is available. Forexample, on Windows only the first 4 of the above examples are avail-
able. The last 2 examples will be displayed identically as the first one. KKEEYYWWOORRDDSS dash, conversion Tk 8.3 TkGetDash(3)