1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1990 The Regents of the University of California.
|
3 |
|
|
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
4 |
|
|
'\"
|
5 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
6 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
7 |
|
|
'\"
|
8 |
|
|
'\" RCS: @(#) $Id: GetCapStyl.3,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
|
9 |
|
|
'\"
|
10 |
|
|
.so man.macros
|
11 |
|
|
.TH Tk_GetCapStyle 3 "" Tk "Tk Library Procedures"
|
12 |
|
|
.BS
|
13 |
|
|
.SH NAME
|
14 |
|
|
Tk_GetCapStyle, Tk_NameOfCapStyle \- translate between strings and cap styles
|
15 |
|
|
.SH SYNOPSIS
|
16 |
|
|
.nf
|
17 |
|
|
\fB#include \fR
|
18 |
|
|
.sp
|
19 |
|
|
int
|
20 |
|
|
\fBTk_GetCapStyle(\fIinterp, string, capPtr\fB)\fR
|
21 |
|
|
.sp
|
22 |
|
|
char *
|
23 |
|
|
\fBTk_NameOfCapStyle(\fIcap\fB)\fR
|
24 |
|
|
.SH ARGUMENTS
|
25 |
|
|
.AS "Tcl_Interp" *capPtr
|
26 |
|
|
.AP Tcl_Interp *interp in
|
27 |
|
|
Interpreter to use for error reporting.
|
28 |
|
|
.AP char *string in
|
29 |
|
|
String containing name of cap style: one of ```butt'', ``projecting'',
|
30 |
|
|
or ``round''.
|
31 |
|
|
.AP int *capPtr out
|
32 |
|
|
Pointer to location in which to store X cap style corresponding to
|
33 |
|
|
\fIstring\fR.
|
34 |
|
|
.AP int cap in
|
35 |
|
|
Cap style: one of \fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR.
|
36 |
|
|
.BE
|
37 |
|
|
|
38 |
|
|
.SH DESCRIPTION
|
39 |
|
|
.PP
|
40 |
|
|
\fBTk_GetCapStyle\fR places in \fI*capPtr\fR the X cap style
|
41 |
|
|
corresponding to \fIstring\fR.
|
42 |
|
|
This will be one of the values
|
43 |
|
|
\fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR.
|
44 |
|
|
Cap styles are typically used in X graphics contexts to indicate
|
45 |
|
|
how the end-points of lines should be capped.
|
46 |
|
|
See the X documentation for information on what each style
|
47 |
|
|
implies.
|
48 |
|
|
.PP
|
49 |
|
|
Under normal circumstances the return value is \fBTCL_OK\fR and
|
50 |
|
|
\fIinterp\fR is unused.
|
51 |
|
|
If \fIstring\fR doesn't contain a valid cap style
|
52 |
|
|
or an abbreviation of one of these names, then an error message is
|
53 |
|
|
stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and
|
54 |
|
|
\fI*capPtr\fR is unmodified.
|
55 |
|
|
.PP
|
56 |
|
|
\fBTk_NameOfCapStyle\fR is the logical inverse of \fBTk_GetCapStyle\fR.
|
57 |
|
|
Given a cap style such as \fBCapButt\fR it returns a
|
58 |
|
|
statically-allocated string corresponding to \fIcap\fR.
|
59 |
|
|
If \fIcap\fR isn't a legal cap style, then
|
60 |
|
|
``unknown cap style'' is returned.
|
61 |
|
|
|
62 |
|
|
.SH KEYWORDS
|
63 |
|
|
butt, cap style, projecting, round
|