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
26                                        “round”.
27
28       int *capPtr (out)                Pointer  to location in which to store
29                                        X cap style corresponding to string.
30
31       int cap (in)                     Cap style: one of CapButt, CapProject‐
32                                        ing, or CapRound.
33_________________________________________________________________
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
46       interp->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
53

KEYWORDS

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