1Tk_GetCapStyle(3)            Tk Library Procedures           Tk_GetCapStyle(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_GetCapStyle,  Tk_NameOfCapStyle  - translate between strings and cap
9       styles
10

SYNOPSIS

12       #include <tk.h>
13
14       int
15       Tk_GetCapStyle(interp, string, capPtr)
16
17       const char *
18       Tk_NameOfCapStyle(cap)
19

ARGUMENTS

21       Tcl_Interp *interp (in)          Interpreter to use for  error  report‐
22                                        ing.
23
24       const char *string (in)          String  containing name of cap style -
25                                        one  of   “butt”,   “projecting”,   or
26round”  - or a unique abbreviation of
27                                        one.
28
29       int *capPtr (out)                Pointer to location in which to  store
30                                        X cap style corresponding to string.
31
32       int cap (in)                     Cap style: one of CapButt, CapProject‐
33                                        ing, or CapRound.
34______________________________________________________________________________
35

DESCRIPTION

37       Tk_GetCapStyle places in *capPtr  the  X  cap  style  corresponding  to
38       string.   This  will  be  one  of the values CapButt, CapProjecting, or
39       CapRound.  Cap styles are typically used  in  X  graphics  contexts  to
40       indicate how the end-points of lines should be capped.  See the X docu‐
41       mentation for information on what each style implies.
42
43       Under normal circumstances the return value is  TCL_OK  and  interp  is
44       unused.   If  string does not contain a valid cap style or an abbrevia‐
45       tion of one of these names, then an error message is stored  in  inter‐
46       preter  interp's  result, TCL_ERROR is returned, and *capPtr is unmodi‐
47       fied.
48
49       Tk_NameOfCapStyle is the logical inverse of  Tk_GetCapStyle.   Given  a
50       cap style such as CapButt it returns a statically-allocated string cor‐
51       responding to cap.  If cap is not a legal cap style, then “unknown  cap
52       style” is returned.
53

KEYWORDS

55       butt, cap style, projecting, round
56
57
58
59Tk                                                           Tk_GetCapStyle(3)
Impressum