GetCapStyl.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1990 The Regents of the University of California.
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: GetCapStyl.3,v 1.3 2002/08/05 04:30:38 dgp Exp $
- '"
- .so man.macros
- .TH Tk_GetCapStyle 3 "" Tk "Tk Library Procedures"
- .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, capPtrfB)fR
- .sp
- CONST char *
- fBTk_NameOfCapStyle(fIcapfB)fR
- .SH ARGUMENTS
- .AS "Tcl_Interp" *capPtr
- .AP Tcl_Interp *interp in
- Interpreter to use for error reporting.
- .AP "CONST 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
- fIstringfR.
- .AP int cap in
- Cap style: one of fBCapButtfR, fBCapProjectingfR, or fBCapRoundfR.
- .BE
- .SH DESCRIPTION
- .PP
- fBTk_GetCapStylefR places in fI*capPtrfR the X cap style
- corresponding to fIstringfR.
- This will be one of the values
- fBCapButtfR, fBCapProjectingfR, or fBCapRoundfR.
- 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_OKfR and
- fIinterpfR is unused.
- If fIstringfR doesn't contain a valid cap style
- or an abbreviation of one of these names, then an error message is
- stored in fIinterp->resultfR, fBTCL_ERRORfR is returned, and
- fI*capPtrfR is unmodified.
- .PP
- fBTk_NameOfCapStylefR is the logical inverse of fBTk_GetCapStylefR.
- Given a cap style such as fBCapButtfR it returns a
- statically-allocated string corresponding to fIcapfR.
- If fIcapfR isn't a legal cap style, then
- ``unknown cap style'' is returned.
- .SH KEYWORDS
- butt, cap style, projecting, round