NAME
TkGetCapStyle, TkNameOfCapStyle - translate between strings and cap
stylesSYNOPSIS
##iinncclluuddee <
int TTkkGGeettCCaappSSttyyllee((interp, string, capPtr)) CONST char * TTkkNNaammeeOOffCCaappSSttyyllee((cap)) AARRGGUUMMEENNTTSS> TclInterp *interp (in) Interpreter to use for error report-
ing. CONST char *string (in) String containing name of cap style: one of ```butt'', ``projecting'', or ``round''. int *capPtr (out) Pointer to location in which to store X cap style corresponding to string.int cap (in) Cap style: one of CCaappBBuutttt, CCaappPPrroojjeecctt-
iinngg, or CCaappRRoouunndd.DESCRIPTION
TTkkGGeettCCaappSSttyyllee places in *capPtr the X cap style corresponding to string. This will be one of the values CCaappBBuutttt, CCaappPPrroojjeeccttiinngg, or CCaappRRoouunndd. Cap styles are typically used in X graphics contexts toindicate how the end-points of lines should be capped. See the X docu-
mentation for information on what each style implies. Under normal circumstances the return value is TTCCLLOOKK and interp is unused. If string doesn't contain a valid cap style or an abbreviation of one of these names, then an error message is stored ininterp->result, TTCCLLEERRRROORR is returned, and *capPtr is unmodified.
TTkkNNaammeeOOffCCaappSSttyyllee is the logical inverse of TTkkGGeettCCaappSSttyyllee. Given acap style such as CCaappBBuutttt it returns a statically-allocated string cor-
responding to cap. If cap isn't a legal cap style, then ``unknown cap style'' is returned. KKEEYYWWOORRDDSS butt, cap style, projecting, round Tk TkGetCapStyle(3)