File: standard-vector-layers.xml

package info (click to toggle)
gwyddion 2.57-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 48,860 kB
  • sloc: ansic: 405,916; python: 7,867; sh: 5,241; makefile: 4,507; xml: 3,786; cpp: 2,572; pascal: 418; perl: 154; ruby: 130
file content (429 lines) | stat: -rw-r--r-- 19,452 bytes parent folder | download
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
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="standard-vector-layers" revision="$Id: standard-vector-layers.xml 21918 2019-02-26 10:42:04Z yeti-dn $">
  <refmeta>
    <refentrytitle>Standard Vector Layers</refentrytitle>
    <manvolnum>3</manvolnum>
    <refmiscinfo>Gwyddion</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>Standard Vector Layers</refname>
    <refpurpose>
      Vector layers that are distributed with <application>Gwyddion</application>
    </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Overview</title>
    <para>
      Vector layers, implementing means how user can draw on data views, are
      provided by <link linkend="libgwymodule-gwymodule-layer">layer modules</link>, so that third party tools (implemented by
      <link linkend="libgwymodule-gwymodule-tool">tool modules</link>)
      can define their own means of user interaction.
    </para>
    <para>
      There are several standard layers distributed with <application>Gwyddion</application>,
      and their features and interface is the subject of this section.
      All layers are subclasses of <link linkend="GwyVectorLayer">GwyVectorLayer</link>
      sharing its basic interface.
      Each layer lets the user draw or select different shapes, therefore each module also
      defines its own selection object type determining the format of selection data.
      All selections are subclasses of <link linkend="GwySelection">GwySelection</link>.
      By convention, layer type Foo is called GwyLayerFoo and the corresponding selection
      type GwySelectionFoo.
    </para>
    <para>
      Layers and selections sometimes have additional object properties not present in the
      base classes, these are described here too.
    </para>
  </refsect1>
  <refsect1>
    <title>GwyLayerAxis, GwySelectionAxis</title>
    <synopsis>
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwyLayerAxis"), NULL);
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwySelectionAxis"), NULL);
    </synopsis>
    <para>
      The layer allows selecting one or more horizontal or vertical (full-width
      or full-height) lines, called axes.  It can be also viewes as a way to
      select separate x or y coordinates.
    </para>
    <para>
      Selection data consists of single coordinates.
      More precisely, of y-coordinates for horizontal axes and x-coordinates for vertical
      axes.  Each coordinate represents a selected axis.
    </para>
    <sect2>
      <title>GwyLayerAxis properties</title>
      <para>None.</para>
    </sect2>
    <sect2>
      <title>GwySelectionAxis properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwySelectionAxis--orientation"/>&quot;<literal>orientation</literal>&quot; (<link linkend="GwyOrientation">GwyOrientation</link> : Read / Write)</term>
          <listitem>
            <para>
              Line orientation: horizontal or vertical.
              The default orientation is horizontal.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
  </refsect1>
  <refsect1>
    <title>GwyLayerCross, GwySelectionCross</title>
    <synopsis>
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwyLayerCross"), NULL);
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwySelectionCross"), NULL);
    </synopsis>
    <para>
      The layer allows selecting a number of simultaneous horizontal and vertical
      lines.  Usually the selection is displayed as a large cross, but it can
      also show only the horizontal and vertical lines or just the cross point
      marker.
    </para>
    <para>
      Selection data consists of coordinate pairs (x, y) representing selected
      cross centres.
    </para>
    <sect2>
      <title>GwyLayerCross properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwyLayerCross--draw-horizontal"/>&quot;<literal>draw-horizontal</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether the horizontal line should be drawn.
              The default is draw the horizontal line.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerCross--draw-vertical"/>&quot;<literal>draw-vertical</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether the vertical line should be drawn.
              The default is draw the vertical line.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerCross--thickness"/>&quot;<literal>thickness</literal>&quot; (gint : Read / Write)</term>
          <listitem>
            <para>
              Width of orthogonal ticks at line ends.
              The default is no ticks.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
    <sect2>
      <title>GwySelectionCross properties</title>
      <para>None.</para>
    </sect2>
  </refsect1>
  <refsect1>
    <title>GwyLayerEllipse, GwySelectionEllipse</title>
    <synopsis>
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwyLayerEllipse"), NULL);
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwySelectionEllipse"), NULL);
    </synopsis>
    <para>
      The layer allows selecting a number of ellipses.
    </para>
    <para>
      Selection data consists of quadruples of coordinates (x<subscript>0</subscript>,
      y<subscript>0</subscript>, x<subscript>1</subscript>, y<subscript>1</subscript>),
      each representing one selected ellipse, where
      x<subscript>0</subscript> and y<subscript>0</subscript> are coordinates of one
      bounding box corner and x<subscript>1</subscript> and y<subscript>1</subscript>
      of the opposite corner. Each one can be any of the four bounding box corners, there
      is no guarantee one is for example always top-left.
    </para>
    <sect2>
      <title>GwyLayerEllipse properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwyLayerEllipse--draw-reflection"/>&quot;<literal>draw-reflection</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether central reflection of selection should be drawn too.
              The default is to not draw reflection.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerEllipse--snap-to-center"/>&quot;<literal>snap-to-center</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether the selection should snap to the center. The default is
              not to snap.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
    <sect2>
      <title>GwySelectionEllipse properties</title>
      <para>None.</para>
    </sect2>
  </refsect1>
  <refsect1>
    <title>GwyLayerLine, GwySelectionLine</title>
    <synopsis>
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwyLayerLine"), NULL);
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwySelectionLine"), NULL);
    </synopsis>
    <para>
      The layer allows selecting one or more lines of arbitrary orientation and
      length, optionally can display line numbers next to each line.
    </para>
    <para>
      Selection data consists of quadruples of coordinates (x<subscript>0</subscript>,
      y<subscript>0</subscript>, x<subscript>1</subscript>, y<subscript>1</subscript>),
      each representing one selected line, where
      x<subscript>0</subscript> and y<subscript>0</subscript> are
      coordinates of one line end and x<subscript>1</subscript> and y<subscript>1</subscript>
      of the other end.
    </para>
    <sect2>
      <title>GwyLayerLine properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwyLayerLine--line-numbers"/>&quot;<literal>line-numbers</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether line numbers should be displayed next to them.
              The default is to show line numbers.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerLine--thickness"/>&quot;<literal>thickness</literal>&quot; (gint : Read / Write)</term>
          <listitem>
            <para>
              Width of orthogonal ticks at line ends.
              The default is no ticks.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerLine--center-tick"/>&quot;<literal>center-tick</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether an tick is drawn in the line centre.
              The default is not to drawn the central tick.
            </para>
            <para role="since">Since: 2.42</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
    <sect2>
      <title>GwySelectionLine properties</title>
      <para>None.</para>
    </sect2>
  </refsect1>
  <refsect1>
    <title>GwyLayerPoint, GwySelectionPoint</title>
    <synopsis>
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwyLayerPoint"), NULL);
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwySelectionPoint"), NULL);
    </synopsis>
    <para>
      The layer allows selecting a number of points, either displayed as
      crosses, crosses with concentric circles, or with no graphical
      representation (the latter mainly useful with only one selected point).
    </para>
    <para>
      Selection data consists of coordinate pairs (x, y) representing selected points.
    </para>
    <sect2>
      <title>GwyLayerPoint properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwyLayerPoint--draw-marker"/>&quot;<literal>draw-marker</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              If set to TRUE, points will be displayed. Otherwise they will be invisible.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerPoint--marker-radius"/>&quot;<literal>marker-radius</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Specifies the radius of the circle to draw around all selected points.
              If set to zero and/or if &quot;<literal>draw-marker</literal>&quot; is
              set to FALSE, no circle will be drawn.
              The default radius is zero.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerLine--point-numbers"/>&quot;<literal>point-numbers</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether point numbers should be displayed next to them.
              The default is not to show point numbers.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerLine--draw-as-vector"/>&quot;<literal>draw-as-vector</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether points should be instead drawn as vector from the origin.
              This setting may interact poorly with other drawing options.
              The default is to draw points as points.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
    <sect2>
      <title>GwySelectionPoint properties</title>
      <para>None.</para>
    </sect2>
  </refsect1>
  <refsect1>
    <title>GwyLayerRectangle, GwySelectionRectangle</title>
    <synopsis>
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwyLayerRectangle"), NULL);
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwySelectionRectangle"), NULL);
    </synopsis>
    <para>
      The layer allows selecting a number of rectangles, that can be drawn with
      a couple of fancy/special styles.
    </para>
    <para>
      Selection data consists of quadruples of coordinates (x<subscript>0</subscript>,
      y<subscript>0</subscript>, x<subscript>1</subscript>, y<subscript>1</subscript>),
      each representing one selected rectangle, where
      x<subscript>0</subscript> and y<subscript>0</subscript> are coordinates of one corner
      and x<subscript>1</subscript> and y<subscript>1</subscript>
      of the opposite corner. Each one can be any of the four rectangle corners, there
      is no guarantee one is for example always top-left.
    </para>
    <sect2>
      <title>GwyLayerRectangle properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwyLayerRectangle--is-crop"/>&quot;<literal>is-crop</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether lines should be drawn always from border to border, as in the Crop tool.
              The default is to draw just outline of the selected rectangle.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerRectangle--draw-reflection"/>&quot;<literal>draw-reflection</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether central reflection of selection should be drawn too.
              The default is to not draw reflection.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwyLayerRectangle--snap-to-center"/>&quot;<literal>snap-to-center</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether the selection should snap to the center. The default is
              to not snap.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
    <sect2>
      <title>GwySelectionRectangle properties</title>
      <para>None.</para>
    </sect2>
  </refsect1>
  <refsect1>
    <title>GwyLayerLattice, GwySelectionLattice</title>
    <synopsis>
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwyLayerLattice"), NULL);
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwySelectionLattice"), NULL);
    </synopsis>
    <para>
      The layer allows selecting a pair of two-dimensional vectors, that
      represent a lattice in the plane.
      The selection is also visualised as a lattice.
    </para>
    <para>
      Selection data consists of quadruples of coordinates (x<subscript>0</subscript>,
      y<subscript>0</subscript>, x<subscript>1</subscript>, y<subscript>1</subscript>),
      each representing the two selected lattice vectors, where
      x<subscript>0</subscript> and y<subscript>0</subscript> are coordinates of one vector
      and x<subscript>1</subscript> and y<subscript>1</subscript>
      of the other.
    </para>
    <para>
      Although the selection can contain multiple such pairs, the layer ignores all except
      the first one.
    </para>
    <sect2>
      <title>GwyLayerLattice properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwyLayerLattice--n-lines"/>&quot;<literal>n-lines</literal>&quot; (guint : Read / Write)</term>
          <listitem>
            <para>
              The number of grille lines drawn along each vector.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
    <sect2>
      <title>GwySelectionLattice properties</title>
      <para>None.</para>
    </sect2>
  </refsect1>
  <refsect1>
    <title>GwyLayerPath, GwySelectionPath</title>
    <synopsis>
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwyLayerPath"), NULL);
<link linkend="GObject">GObject*</link>    <link linkend="g-object-new">g_object_new</link>(<link linkend="g-type-from-name">g_type_from_name</link>("GwySelectionPath"), NULL);
    </synopsis>
    <para>
      The layer allows selecting a long spline curve passing through given
      points.
    </para>
    <para>
      Selection data consists of coordinate pairs (x, y) representing the
      points defining the curve.  The curve is implicitly oriented from the
      first pair to the last one.
    </para>
    <sect2>
      <title>GwyLayerPath properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwyLayerPath--thickness"/>&quot;<literal>thickness</literal>&quot; (gint : Read / Write)</term>
          <listitem>
            <para>
              Width of orthogonal ticks at line ends.
              The default is no ticks.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
    <sect2>
      <title>GwySelectionPath properties</title>
      <variablelist>
        <varlistentry><term><anchor id="GwySelectionPath--slackness"/>&quot;<literal>closed</literal>&quot; (gdouble : Read / Write)</term>
          <listitem>
            <para>
              How much the curve is slack/taut, from the interval [0, sqrt(2)].
              Value of 0 corresponds to completely taut curve, i.e. straight
              lines connecting the points.
              Value of 1 corresponds to free curve.
              The default value is 1/sqrt(2).
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term><anchor id="GwySelectionPath--closed"/>&quot;<literal>closed</literal>&quot; (gboolean : Read / Write)</term>
          <listitem>
            <para>
              Whether the curve is closed, i.e. continues smoothly from the
              last point back to the first point.
              The default is open-ended (not closed) curve.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
  </refsect1>
</refentry>