~ubuntu-branches/ubuntu/precise/graphviz/precise-security

« back to all changes in this revision

Viewing changes to tclpkg/tkspline/tkspline.n

  • Committer: Bazaar Package Importer
  • Author(s): David Claughton
  • Date: 2010-03-24 22:45:18 UTC
  • mfrom: (1.2.7 upstream) (6.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100324224518-do441tthbqjaqjzd
Tags: 2.26.3-4
Add patch to fix segfault in circo. Backported from upstream snapshot
release.  Thanks to Francis Russell for his work on this.
(Closes: #575255)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.lf 1 tkspline.n
2
 
.lf 1 man.macros
3
 
'\" The definitions below are for supplemental macros used in Tcl/Tk
4
 
'\" manual entries.
5
 
'\"
6
 
'\" .AP type name in/out ?indent?
7
 
'\"     Start paragraph describing an argument to a library procedure.
8
 
'\"     type is type of argument (int, etc.), in/out is either "in", "out",
9
 
'\"     or "in/out" to describe whether procedure reads or modifies arg,
10
 
'\"     and indent is equivalent to second arg of .IP (shouldn't ever be
11
 
'\"     needed;  use .AS below instead)
12
 
'\"
13
 
'\" .AS ?type? ?name?
14
 
'\"     Give maximum sizes of arguments for setting tab stops.  Type and
15
 
'\"     name are examples of largest possible arguments that will be passed
16
 
'\"     to .AP later.  If args are omitted, default tab stops are used.
17
 
'\"
18
 
'\" .BS
19
 
'\"     Start box enclosure.  From here until next .BE, everything will be
20
 
'\"     enclosed in one large box.
21
 
'\"
22
 
'\" .BE
23
 
'\"     End of box enclosure.
24
 
'\"
25
 
'\" .CS
26
 
'\"     Begin code excerpt.
27
 
'\"
28
 
'\" .CE
29
 
'\"     End code excerpt.
30
 
'\"
31
 
'\" .VS ?br?
32
 
'\"     Begin vertical sidebar, for use in marking newly-changed parts
33
 
'\"     of man pages.  If an argument is present, then a line break is
34
 
'\"     forced before starting the sidebar.
35
 
'\"
36
 
'\" .VE
37
 
'\"     End of vertical sidebar.
38
 
'\"
39
 
'\" .DS
40
 
'\"     Begin an indented unfilled display.
41
 
'\"
42
 
'\" .DE
43
 
'\"     End of indented unfilled display.
44
 
'\"
45
 
'\" .SO
46
 
'\"     Start of list of standard options for a Tk widget.  The
47
 
'\"     options follow on successive lines, in four columns separated
48
 
'\"     by tabs.
49
 
'\"
50
 
'\" .SE
51
 
'\"     End of list of standard options for a Tk widget.
52
 
'\"
53
 
'\" .OP cmdName dbName dbClass
54
 
'\"     Start of description of a specific option.  cmdName gives the
55
 
'\"     option's name as specified in the class command, dbName gives
56
 
'\"     the option's name in the option database, and dbClass gives
57
 
'\"     the option's class in the option database.
58
 
'\"
59
 
'\" .UL arg1 arg2
60
 
'\"     Print arg1 underlined, then print arg2 normally.
61
 
'\"
62
 
'\" SCCS: @(#) man.macros 1.8 96/02/15 20:02:24
63
 
'\"
64
 
'\"     # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
65
 
.if t .wh \-1.3i ^B
66
 
.nr ^l \n(.l
67
 
.ad b
68
 
'\"     # Start an argument description
69
 
.de AP
70
 
.ie !"\\$4"" .TP \\$4
71
 
.el \{\
72
 
.   ie !"\\$2"" .TP \\n()Cu
73
 
.   el          .TP 15
74
 
.\}
75
 
.ie !"\\$3"" \{\
76
 
.ta \\n()Au \\n()Bu
77
 
\&\\$1  \\fI\\$2\\fP    (\\$3)
78
 
.\".b
79
 
.\}
80
 
.el \{\
81
 
.br
82
 
.ie !"\\$2"" \{\
83
 
\&\\$1  \\fI\\$2\\fP
84
 
.\}
85
 
.el \{\
86
 
\&\\fI\\$1\\fP
87
 
.\}
88
 
.\}
89
 
..
90
 
'\"     # define tabbing values for .AP
91
 
.de AS
92
 
.nr )A 10n
93
 
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
94
 
.nr )B \\n()Au+15n
95
 
.\"
96
 
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
97
 
.nr )C \\n()Bu+\\w'(in/out)'u+2n
98
 
..
99
 
.AS Tcl_Interp Tcl_CreateInterp in/out
100
 
'\"     # BS \- start boxed text
101
 
'\"     # ^y = starting y location
102
 
'\"     # ^b = 1
103
 
.de BS
104
 
.br
105
 
.mk ^y
106
 
.nr ^b 1u
107
 
.if n .nf
108
 
.if n .ti 0
109
 
.if n \l'\\n(.lu\(ul'
110
 
.if n .fi
111
 
..
112
 
'\"     # BE \- end boxed text (draw box now)
113
 
.de BE
114
 
.nf
115
 
.ti 0
116
 
.mk ^t
117
 
.ie n \l'\\n(^lu\(ul'
118
 
.el \{\
119
 
.\"     Draw four-sided box normally, but don't draw top of
120
 
.\"     box if the box started on an earlier page.
121
 
.ie !\\n(^b\-1 \{\
122
 
\h'\-1.5n'\L'|\\n(^yu\-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v\-\\n(^yu'\l'|0u\-1.5n\(ul'
123
 
.\}
124
 
.el \}\
125
 
\h'\-1.5n'\L'|\\n(^yu\-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v\-\\n(^yu'\l'|0u\-1.5n\(ul'
126
 
.\}
127
 
.\}
128
 
.fi
129
 
.br
130
 
.nr ^b 0
131
 
..
132
 
'\"     # VS \- start vertical sidebar
133
 
'\"     # ^Y = starting y location
134
 
'\"     # ^v = 1 (for troff;  for nroff this doesn't matter)
135
 
.de VS
136
 
.if !"\\$1"" .br
137
 
.mk ^Y
138
 
.ie n 'mc \s12\(br\s0
139
 
.el .nr ^v 1u
140
 
..
141
 
'\"     # VE \- end of vertical sidebar
142
 
.de VE
143
 
.ie n 'mc
144
 
.el \{\
145
 
.ev 2
146
 
.nf
147
 
.ti 0
148
 
.mk ^t
149
 
\h'|\\n(^lu+3n'\L'|\\n(^Yu\-1v\(bv'\v'\\n(^tu+1v\-\\n(^Yu'\h'\-|\\n(^lu+3n'
150
 
.sp \-1
151
 
.fi
152
 
.ev
153
 
.\}
154
 
.nr ^v 0
155
 
..
156
 
'\"     # Special macro to handle page bottom:  finish off current
157
 
'\"     # box/sidebar if in box/sidebar mode, then invoked standard
158
 
'\"     # page bottom macro.
159
 
.de ^B
160
 
.ev 2
161
 
'ti 0
162
 
'nf
163
 
.mk ^t
164
 
.if \\n(^b \{\
165
 
.\"     Draw three-sided box if this is the box's first page,
166
 
.\"     draw two sides but no top otherwise.
167
 
.ie !\\n(^b\-1 \h'\-1.5n'\L'|\\n(^yu\-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v\-\\n(^yu'\h'|0u'\c
168
 
.el \h'\-1.5n'\L'|\\n(^yu\-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v\-\\n(^yu'\h'|0u'\c
169
 
.\}
170
 
.if \\n(^v \{\
171
 
.nr ^x \\n(^tu+1v\-\\n(^Yu
172
 
\kx\h'\-\\nxu'\h'|\\n(^lu+3n'\ky\L'\-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
173
 
.\}
174
 
.bp
175
 
'fi
176
 
.ev
177
 
.if \\n(^b \{\
178
 
.mk ^y
179
 
.nr ^b 2
180
 
.\}
181
 
.if \\n(^v \{\
182
 
.mk ^Y
183
 
.\}
184
 
..
185
 
'\"     # DS \- begin display
186
 
.de DS
187
 
.RS
188
 
.nf
189
 
.sp
190
 
..
191
 
'\"     # DE \- end display
192
 
.de DE
193
 
.fi
194
 
.RE
195
 
.sp
196
 
..
197
 
'\"     # SO \- start of list of standard options
198
 
.de SO
199
 
.SH "STANDARD OPTIONS"
200
 
.LP
201
 
.nf
202
 
.ta 4c 8c 12c
203
 
.ft B
204
 
..
205
 
'\"     # SE \- end of list of standard options
206
 
.de SE
207
 
.fi
208
 
.ft R
209
 
.LP
210
 
See the \\fBoptions\\fR manual entry for details on the standard options.
211
 
..
212
 
'\"     # OP \- start of full description for a single option
213
 
.de OP
214
 
.LP
215
 
.nf
216
 
.ta 4c
217
 
Command\-Line Name:     \\fB\\$1\\fR
218
 
Database Name:  \\fB\\$2\\fR
219
 
Database Class: \\fB\\$3\\fR
220
 
.fi
221
 
.IP
222
 
..
223
 
'\"     # CS \- begin code excerpt
224
 
.de CS
225
 
.RS
226
 
.nf
227
 
.ta .25i .5i .75i 1i
228
 
..
229
 
'\"     # CE \- end code excerpt
230
 
.de CE
231
 
.fi
232
 
.RE
233
 
..
234
 
.de UL
235
 
\\$1\l'|0\(ul'\\$2
236
 
..
237
 
.lf 2 tkspline.n
238
 
.TH tkspline n 8.0 Tk "Tk Spline \- An additional smoothing method for canvas items "
239
 
.BS
240
 
'\" Note:  do not modify the .SH NAME line immediately below!
241
 
.SH NAME
242
 
\fBspline\fR, \- additional smoothing method for canvas items.
243
 
.SH SYNOPSIS
244
 
.nf
245
 
        package require Tkspline
246
 
        ...
247
 
        .c create line ... \-smooth spline ...
248
 
        .c create polygon ... \-smooth spline ...
249
 
.fo
250
 
.BE
251
 
.SH INTRODUCTION
252
 
.PP
253
 
The new option value: \fB\-smooth spline\fR provides an additional smoothing method to
254
 
\fBline\fR and \fBpolygon\fR canvas items.
255
 
 
256
 
.PP
257
 
Spline smoothing will revert to the builtin smoothing method unless the number
258
 
of points is 3n+1, where n is the number of spline segments.
259
 
(Normally in polygons this means 3n points because the last point of the spline
260
 
is understood to be the same as the first in order to close the polygon).
261
 
 
262
 
.PP
263
 
In \fBline\fR and \fBpolygon\fR items, the curves generated with the standard
264
 
\fB\-smooth true\fR option have the following properties:
265
 
.TP 3
266
 
-
267
 
the curve is always tangential to a straight line between consecutive points.
268
 
.TP 3 
269
 
-
270
 
the curve is only guaranteed to intersect the first and last points of \fBline\fRs. 
271
 
.TP 3 
272
 
273
 
the curve is not guaranteed to intersect any points of \fBpolygon\fRs.
274
 
 
275
 
.PP
276
 
With \fB\-smooth spline\fR (and the right number of coordinates) 
277
 
the curves generated have the following different properties:
278
 
.TP 3
279
 
-
280
 
the curve is guaranteed to intersect the first point, and every third point after that.
281
 
.TP 3
282
 
-
283
 
each segment of the curve shares endpoints with the adjacent segments,
284
 
but is otherwise independant of them.  
285
 
.TP 3
286
 
-
287
 
the curve is guaranteed to be tangential to a line between n and n+1 at 
288
 
point n, and also to a line between n+2 and n+3 at point n+3. 
289
 
.TP 3
290
 
-
291
 
the curve is not guaranteed to be smooth at the junctions between 
292
 
segments unless the shared point and the points either side of it are 
293
 
on a straight line.
294
 
 
295
 
.PP
296
 
These alternative properties are useful to some path planning algorithms.
297
 
 
298
 
.SH CREDITS
299
 
The underlying Bezier code is in John Ousterhout's original
300
 
canvas widget, this extension just provides an alternate interface
301
 
to it.   The hooks into the canvas are provided by Jan Nijtmans in 
302
 
his "dash" patch.
303
 
 
304
 
.SH KEYWORDS
305
 
spline, line, polygon, bezier, canvas, widget
306
 
 
307
 
.SH AUTHOR
308
 
John Ellson, ellson@graphviz.org