This file is indexed.

/usr/share/gtk-doc/html/libgwyprocess/libgwyprocess-GwySpline.html is in libgwyddion20-doc 2.47-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GwySpline: Gwyddion Data Processing Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Gwyddion Data Processing Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Data Processing Library Reference Manual">
<link rel="prev" href="GwyShapeFitPreset.html" title="GwyShapeFitPreset">
<link rel="next" href="libgwyprocess-stats.html" title="stats">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libgwyprocess-GwySpline.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="GwyShapeFitPreset.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgwyprocess-stats.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgwyprocess-GwySpline"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgwyprocess-GwySpline.top_of_page"></a>GwySpline</span></h2>
<p>GwySpline — Sampling curves in plane</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgwyprocess-GwySpline.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="returnvalue">GwySpline</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-new" title="gwy_spline_new ()">gwy_spline_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-free" title="gwy_spline_free ()">gwy_spline_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="returnvalue">GwySpline</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-new-from-points" title="gwy_spline_new_from_points ()">gwy_spline_new_from_points</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-get-npoints" title="gwy_spline_get_npoints ()">gwy_spline_get_npoints</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">GwyXY</span> *
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-get-points" title="gwy_spline_get_points ()">gwy_spline_get_points</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">GwyXY</span> *
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-get-tangents" title="gwy_spline_get_tangents ()">gwy_spline_get_tangents</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-get-slackness" title="gwy_spline_get_slackness ()">gwy_spline_get_slackness</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-get-closed" title="gwy_spline_get_closed ()">gwy_spline_get_closed</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-set-points" title="gwy_spline_set_points ()">gwy_spline_set_points</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-set-slackness" title="gwy_spline_set_slackness ()">gwy_spline_set_slackness</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-set-closed" title="gwy_spline_set_closed ()">gwy_spline_set_closed</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-length" title="gwy_spline_length ()">gwy_spline_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">GwyXY</span> *
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-sample-naturally" title="gwy_spline_sample_naturally ()">gwy_spline_sample_naturally</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-sample-uniformly" title="gwy_spline_sample_uniformly ()">gwy_spline_sample_uniformly</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgwyprocess-GwySpline.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline">GwySpline</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgwyprocess-GwySpline.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libprocess/gwyprocess.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="libgwyprocess-GwySpline.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libgwyprocess-GwySpline.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gwy-spline-new"></a><h3>gwy_spline_new ()</h3>
<pre class="programlisting"><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="returnvalue">GwySpline</span></a> *
gwy_spline_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new empty spline curve.</p>
<p>You need to set the curve points using <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-set-points" title="gwy_spline_set_points ()"><code class="function">gwy_spline_set_points()</code></a> before any
sampling along the curve.  Alternatively, use <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-new-from-points" title="gwy_spline_new_from_points ()"><code class="function">gwy_spline_new_from_points()</code></a>
to construct the spline already with some points.</p>
<div class="refsect3">
<a name="gwy-spline-new.returns"></a><h4>Returns</h4>
<p> A newly created spline curve.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-free"></a><h3>gwy_spline_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_spline_free (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>);</pre>
<p>Frees a spline curve and all associated resources.</p>
<div class="refsect3">
<a name="gwy-spline-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-new-from-points"></a><h3>gwy_spline_new_from_points ()</h3>
<pre class="programlisting"><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="returnvalue">GwySpline</span></a> *
gwy_spline_new_from_points (<em class="parameter"><code>const <span class="type">GwyXY</span> *xy</code></em>,
                            <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>Creates a new spline curve passing through given points.</p>
<p>See <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-set-points" title="gwy_spline_set_points ()"><code class="function">gwy_spline_set_points()</code></a> for discussion.</p>
<div class="refsect3">
<a name="gwy-spline-new-from-points.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>xy</p></td>
<td class="parameter_description"><p>Array of points in plane the curve will pass through.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>Number of points in <em class="parameter"><code>xy</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-new-from-points.returns"></a><h4>Returns</h4>
<p> A newly created spline curve.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-get-npoints"></a><h3>gwy_spline_get_npoints ()</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gwy_spline_get_npoints (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>);</pre>
<p>Gets the number of points of a spline curve.</p>
<div class="refsect3">
<a name="gwy-spline-get-npoints.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-get-npoints.returns"></a><h4>Returns</h4>
<p> The number of XY points defining the curve.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-get-points"></a><h3>gwy_spline_get_points ()</h3>
<pre class="programlisting">const <span class="returnvalue">GwyXY</span> *
gwy_spline_get_points (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>);</pre>
<p>Gets the coordinates of spline curve points.</p>
<p>If the spline is empty (there are no points) the function returns <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<div class="refsect3">
<a name="gwy-spline-get-points.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-get-points.returns"></a><h4>Returns</h4>
<p> Coordinates of the XY points defining the curve.  The returned
array is owned by <em class="parameter"><code>spline</code></em>
, must not be modified and is only
guaranteed to exist so long as the spline is not modified nor
destroyed.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-get-tangents"></a><h3>gwy_spline_get_tangents ()</h3>
<pre class="programlisting">const <span class="returnvalue">GwyXY</span> *
gwy_spline_get_tangents (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>);</pre>
<p>Gets tangents to the curve in its defining points.</p>
<p>See <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-sample-uniformly" title="gwy_spline_sample_uniformly ()"><code class="function">gwy_spline_sample_uniformly()</code></a> for discussion.</p>
<p>If the spline is empty (there are no points) the function returns <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<div class="refsect3">
<a name="gwy-spline-get-tangents.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-get-tangents.returns"></a><h4>Returns</h4>
<p> Tangents to the spline in the XY points defining the curve.  The
returned array is owned by <em class="parameter"><code>spline</code></em>
, must not be modified and is
only guaranteed to exist so long as the spline is not modified nor
destroyed.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-get-slackness"></a><h3>gwy_spline_get_slackness ()</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gwy_spline_get_slackness (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>);</pre>
<p>Gets the slackness parameter of a spline curve.</p>
<p>See <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-set-slackness" title="gwy_spline_set_slackness ()"><code class="function">gwy_spline_set_slackness()</code></a> for discussion.</p>
<div class="refsect3">
<a name="gwy-spline-get-slackness.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-get-slackness.returns"></a><h4>Returns</h4>
<p> The slackness parameter value.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-get-closed"></a><h3>gwy_spline_get_closed ()</h3>
<pre class="programlisting"><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_spline_get_closed (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>);</pre>
<p>Reports whether a spline curve is closed or not.</p>
<p>See <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-set-closed" title="gwy_spline_set_closed ()"><code class="function">gwy_spline_set_closed()</code></a> for discussion.</p>
<div class="refsect3">
<a name="gwy-spline-get-closed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-get-closed.returns"></a><h4>Returns</h4>
<p> <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>spline</code></em>
is closed, <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is open-ended.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-set-points"></a><h3>gwy_spline_set_points ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_spline_set_points (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>,
                       <em class="parameter"><code>const <span class="type">GwyXY</span> *xy</code></em>,
                       <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>Sets the coordinates of XY points a spline curve should pass through.</p>
<p>It is possible to pass <em class="parameter"><code>n</code></em>
=0 to make the spline empty (<em class="parameter"><code>xy</code></em>
 can be <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then)
but such spline may not be sampled using <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-sample-uniformly" title="gwy_spline_sample_uniformly ()"><code class="function">gwy_spline_sample_uniformly()</code></a>.</p>
<p>The coordinates should be device-scaled, i.e. they should data field rows
and columns, or screen or image pixels.  Generally, the unit length should
be about the smallest distinguishable distance.</p>
<p>This is important namely for <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-sample-naturally" title="gwy_spline_sample_naturally ()"><code class="function">gwy_spline_sample_naturally()</code></a> that stops
refining the curve when the details become too tiny, even though there may
be sharp changes of direction.  It is also important if the physical X and Y
scales differ.</p>
<p>Using unscaled physical coordinates may produce odd results.</p>
<div class="refsect3">
<a name="gwy-spline-set-points.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>xy</p></td>
<td class="parameter_description"><p>Array of points in plane the curve will pass through.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>Number of points in <em class="parameter"><code>xy</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-set-slackness"></a><h3>gwy_spline_set_slackness ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_spline_set_slackness (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>,
                          <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> slackness</code></em>);</pre>
<p>Sets the slackness parameter of a spline curve.</p>
<p>The slackness parameter determines how taut or slack the curve is.</p>
<p>The curve always passes through the given XY points.  For zero slackness
the curve is maximally taut, i.e. the shortest possible passing
through the points.  Such curve is formed by straight segments.  For
slackness of 1 the curve is a ‘free’ spline.  Values smaller than 1 mean
tensile stress while values larger than 1 compressive stres.  The default
value is 1/sqrt(2).</p>
<div class="refsect3">
<a name="gwy-spline-set-slackness.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>slackness</p></td>
<td class="parameter_description"><p>New slackness parameter value from the range [0, <a href="/usr/share/gtk-doc/html/glibglib-Numerical-Definitions.html#G-SQRT2:CAPS"><code class="literal">G_SQRT2</code></a>].</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-set-closed"></a><h3>gwy_spline_set_closed ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_spline_set_closed (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>,
                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> closed</code></em>);</pre>
<p>Sets whether a spline curve is closed or open.</p>
<p>In closed curve the last point is connected smoothly with the first point,
forming a cycle.  Note you should not repeat the point in the <em class="parameter"><code>xy</code></em>
 array.
When a closed curve is sampled, the sampling starts from the first point
and continues beyond the last point until it gets close to the first point
again.</p>
<p>An open curve begins with the first point and ends with the last point.  It
has zero curvature at these two points.</p>
<div class="refsect3">
<a name="gwy-spline-set-closed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>closed</p></td>
<td class="parameter_description"><p><a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to make <em class="parameter"><code>spline</code></em>
closed, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to make it open-ended.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-length"></a><h3>gwy_spline_length ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gwy_spline_length (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>);</pre>
<p>Calculates the length of a spline curve.</p>
<p>This is useful when you want to sample the curve with a specific step
(at least approximately).</p>
<p>Note <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-sample-uniformly" title="gwy_spline_sample_uniformly ()"><code class="function">gwy_spline_sample_uniformly()</code></a> also returns the length.</p>
<div class="refsect3">
<a name="gwy-spline-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-length.returns"></a><h4>Returns</h4>
<p> The curve length.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-sample-naturally"></a><h3>gwy_spline_sample_naturally ()</h3>
<pre class="programlisting">const <span class="returnvalue">GwyXY</span> *
gwy_spline_sample_naturally (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>,
                             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> *n</code></em>);</pre>
<p>Samples efficiently a spline curve.</p>
<p>This function calculates coordinates of points that lie on the spline curve
and are sufficient for a good approximation by straight lines. This is
particularly useful for drawing the curve.</p>
<p>See <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-sample-uniformly" title="gwy_spline_sample_uniformly ()"><code class="function">gwy_spline_sample_uniformly()</code></a> for some discussion of closed versus open
curves and corner case handling.</p>
<div class="refsect3">
<a name="gwy-spline-sample-naturally.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>Location where to store the number of returned points.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-sample-naturally.returns"></a><h4>Returns</h4>
<p> Coordinates of the XY points defining the sampled curve.  The
returned array is owned by <em class="parameter"><code>spline</code></em>
, must not be modified and is
only guaranteed to exist so long as the spline is not modified nor
destroyed.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-spline-sample-uniformly"></a><h3>gwy_spline_sample_uniformly ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gwy_spline_sample_uniformly (<em class="parameter"><code><a class="link" href="libgwyprocess-GwySpline.html#GwySpline" title="GwySpline"><span class="type">GwySpline</span></a> *spline</code></em>,
                             <em class="parameter"><code><span class="type">GwyXY</span> *xy</code></em>,
                             <em class="parameter"><code><span class="type">GwyXY</span> *t</code></em>,
                             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>Samples uniformly a spline curve.</p>
<p>This function calculates coordinates of points that lie on the spline curve
and are equidistant along it.  For open curves the first sampled point
coincides with the first given XY point and, similar, the last with the last.
For closed curves the first point again coincides with the first given XY
point but the last lies one sampling distance before the curve gets back
again to the first point.</p>
<p>If you want to specify the sampling step instead of the number of samples
use <a class="link" href="libgwyprocess-GwySpline.html#gwy-spline-length" title="gwy_spline_length ()"><code class="function">gwy_spline_length()</code></a> first to obtain the curve length and calculate <em class="parameter"><code>n</code></em>

accordingly.</p>
<p>A single-point curve always consists of a single point.  Hence all samples
lie in this point.  A two-point curve is always formed by straight segments,
in the case of a closed curve one going forward and the other back.  A
meaningful sampling requires <em class="parameter"><code>n</code></em>
 at least 2, nevertheless, the function
permits also <em class="parameter"><code>n</code></em>
 of one or zero.</p>
<p>The tangents vectors stored in <em class="parameter"><code>t</code></em>
 are normalised and oriented from the
beginning of the curve towards the end.  If two or more consecutive given XY
points coincide or the curve has only a single point the vectors may be
(0,0).</p>
<div class="refsect3">
<a name="gwy-spline-sample-uniformly.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>spline</p></td>
<td class="parameter_description"><p>A spline curve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>xy</p></td>
<td class="parameter_description"><p>Array where the sampled point coordinates should be stored in.
May be <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you are only interested in the tangents.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>t</p></td>
<td class="parameter_description"><p>Array where tangent vectors at the <em class="parameter"><code>xy</code></em>
coordinates should be stored in.
May be <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you are only interested in the coordinates.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>The number of samples to take.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-spline-sample-uniformly.returns"></a><h4>Returns</h4>
<p> The curve length.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-45.html#api-index-2.45">2.45</a></p>
</div>
</div>
<div class="refsect1">
<a name="libgwyprocess-GwySpline.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GwySpline"></a><h3>GwySpline</h3>
<pre class="programlisting">typedef struct _GwySpline GwySpline;</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.19</div>
</body>
</html>