Debian Codegraph @

pod/pTk/GetJoinStl.pod

raw
1 # Copyright (c) 1990 The Regents of the University of California.
2 # Copyright (c) 1994-1996 Sun Microsystems, Inc.
3 # See the file "license.terms" for information on usage and redistribution
4 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5 #
6 #
7
8 =head1 NAME
9
10 Tk_GetJoinStyle, Tk_NameOfJoinStyle - translate between strings and join styles
11
12 =for category C Programming
13
14 =head1 SYNOPSIS
15
16 B<#include E<lt>tk.hE<gt>>
17
18 int
19 B<Tk_GetJoinStyle(>I<interp, string, joinPtr>B<)>
20
21 char *
22 B<Tk_NameOfJoinStyle(>I<join>B<)>
23
24 =head1 ARGUMENTS
25
26 =over 4
27
28 =item Tcl_Interp *interp (in)
29
30 Interpreter to use for error reporting.
31
32 =item char *string (in)
33
34 String containing name of join style: one of ``bevel'', ``miter'',
35 or ``round''.
36
37 =item int *joinPtr (out)
38
39 Pointer to location in which to store X join style corresponding to
40 I<string>.
41
42 =item int join (in)
43
44 Join style: one of B<JoinBevel>, B<JoinMiter>, B<JoinRound>.
45
46 =back
47
48 =head1 DESCRIPTION
49
50 B<Tk_GetJoinStyle> places in I<*joinPtr> the X join style
51 corresponding to I<string>, which will be one of
52 B<JoinBevel>, B<JoinMiter>, or B<JoinRound>.
53 Join styles are typically used in X graphics contexts to indicate
54 how adjacent line segments should be joined together.
55 See the X documentation for information on what each style
56 implies.
57
58 Under normal circumstances the return value is B<TCL_OK> and
59 I<interp> is unused.
60 If I<string> doesn't contain a valid join style
61 or an abbreviation of one of these names, then an error message is
62 stored in I<interp-E<gt>result>, B<TCL_ERROR> is returned, and
63 I<*joinPtr> is unmodified.
64
65 B<Tk_NameOfJoinStyle> is the logical inverse of B<Tk_GetJoinStyle>.
66 Given a join style such as B<JoinBevel> it returns a
67 statically-allocated string corresponding to I<join>.
68 If I<join> isn't a legal join style, then
69 ``unknown join style'' is returned.
70
71 =head1 KEYWORDS
72
73 bevel, join style, miter, round