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  in‐
40       dicate  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 un‐
44       used.   If string does not contain a valid cap style or an abbreviation
45       of one of these names, then an error message is stored  in  interpreter
46       interp's result, TCL_ERROR is returned, and *capPtr is unmodified.
47
48       Tk_NameOfCapStyle  is  the  logical inverse of Tk_GetCapStyle.  Given a
49       cap style such as CapButt it returns a statically-allocated string cor‐
50       responding  to cap.  If cap is not a legal cap style, then “unknown cap
51       style” is returned.
52

KEYWORDS

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