Copyright (C) 2000-2012 |
Manpages Tk_GetDashSection: Tk Library Procedures (3)Updated: 8.3 Index Return to Main Contents NAMETk_GetDash - convert from string to valid dash structure.SYNOPSIS#include <tk.h> int Tk_GetDash(interp, string, dashPtr) ARGUMENTS
DESCRIPTIONThese procedure parses the string and fills in the result in the Tk_Dash structure. The string can be a list of integers or a character string containing only [.,-_] or spaces. If all goes well, TCL_OK is returned. If string doesn't have the proper syntax then TCL_ERROR 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 represents the number of pixels of a line segment. Only the odd segments are drawn using the "outline" color. The other segments are drawn transparent.
The second possible syntax is a character list containing only
5 possible 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:
The main difference of this syntax with the previous is that it it shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This assures that "." will always 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. For example, on Windows only the first 4 of the above examples are available. The last 2 examples will be displayed identically as the first one. KEYWORDSdash, conversion
IndexThis document was created by man2html, using the manual pages. Time: 15:36:12 GMT, April 18, 2024 |