77 lines
2.8 KiB
Groff
77 lines
2.8 KiB
Groff
|
'\"
|
||
|
'\" Copyright (c) 1990 The Regents of the University of California.
|
||
|
'\" All rights reserved.
|
||
|
'\"
|
||
|
'\" Permission is hereby granted, without written agreement and without
|
||
|
'\" license or royalty fees, to use, copy, modify, and distribute this
|
||
|
'\" documentation for any purpose, provided that the above copyright
|
||
|
'\" notice and the following two paragraphs appear in all copies.
|
||
|
'\"
|
||
|
'\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
|
||
|
'\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||
|
'\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
||
|
'\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
'\"
|
||
|
'\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
||
|
'\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
'\" AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||
|
'\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
||
|
'\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||
|
'\"
|
||
|
'\" $Header: /user6/ouster/wish/man/RCS/GetCapStyl.3,v 1.5 93/04/01 09:41:24 ouster Exp $ SPRITE (Berkeley)
|
||
|
'\"
|
||
|
.so man.macros
|
||
|
.HS Tk_GetCapStyle tkc
|
||
|
.BS
|
||
|
.SH NAME
|
||
|
Tk_GetCapStyle, Tk_NameOfCapStyle \- translate between strings and cap styles
|
||
|
.SH SYNOPSIS
|
||
|
.nf
|
||
|
\fB#include <tk.h>\fR
|
||
|
.sp
|
||
|
int
|
||
|
\fBTk_GetCapStyle(\fIinterp, string, capPtr\fB)\fR
|
||
|
.sp
|
||
|
char *
|
||
|
\fBTk_NameOfCapStyle(\fIcap\fB)\fR
|
||
|
.SH ARGUMENTS
|
||
|
.AS "Tcl_Interp" *capPtr
|
||
|
.AP Tcl_Interp *interp in
|
||
|
Interpreter to use for error reporting.
|
||
|
.AP char *string in
|
||
|
String containing name of cap style: one of ```butt'', ``projecting'',
|
||
|
or ``round''.
|
||
|
.AP int *capPtr out
|
||
|
Pointer to location in which to store X cap style corresponding to
|
||
|
\fIstring\fR.
|
||
|
.AP int cap in
|
||
|
Cap style: one of \fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR.
|
||
|
.BE
|
||
|
|
||
|
.SH DESCRIPTION
|
||
|
.PP
|
||
|
\fBTk_GetCapStyle\fR places in \fI*capPtr\fR the X cap style
|
||
|
corresponding to \fIstring\fR.
|
||
|
This will be one of the values
|
||
|
\fBCapButt\fR, \fBCapProjecting\fR, or \fBCapRound\fR.
|
||
|
Cap styles are typically used in X graphics contexts to indicate
|
||
|
how the end-points of lines should be capped.
|
||
|
See the X documentation for information on what each style
|
||
|
implies.
|
||
|
.PP
|
||
|
Under normal circumstances the return value is \fBTCL_OK\fR and
|
||
|
\fIinterp\fR is unused.
|
||
|
If \fIstring\fR doesn't contain a valid cap style
|
||
|
or an abbreviation of one of these names, then an error message is
|
||
|
stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and
|
||
|
\fI*capPtr\fR is unmodified.
|
||
|
.PP
|
||
|
\fBTk_NameOfCapStyle\fR is the logical inverse of \fBTk_GetCapStyle\fR.
|
||
|
Given a cap style such as \fBCapButt\fR it returns a
|
||
|
statically-allocated string corresponding to \fIcap\fR.
|
||
|
If \fIcap\fR isn't a legal cap style, then
|
||
|
``unknown cap style'' is returned.
|
||
|
|
||
|
.SH KEYWORDS
|
||
|
butt, cap style, projecting, round
|