Standard Vector Layers

Standard Vector Layers — Vector layers that are distributed with Gwyddion

Overview

Warning

This section is outdated.

Vector layers, implementing means how user can draw on data views, are provided by layer modules, so that third party tools (implemented by tool modules) can define their own means of user interaction.

There are several standard layers distributed with Gwyddion, and their features and interface is the subject of this section. All layers are subclasses of GwyVectorLayer sharing its basic interface. Each layer lets the user draw or select different shapes, has its own format of selection data (that can be fetched with gwy_vector_layer_get_selection() and set with gwy_vector_layer_get_selection()), uses different container keys to store it, and may have some properties (set by g_object_set()) affecting its behaviour.

GwyLayerAxes

GObject*    g_object_new(g_type_from_name("GwyLayerAxes"));
    

Allows to select 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.

Properties

"max_axes" (gint : Read / Write)

The maximum number of axes user can select. Default number is 3 axes.

"orientation" (GtkOrientation : Read / Write)

Line orientation: horizontal or vertical. Default orientation is horizontal.

Selection data

Selection data consists of an array of y-coordinates for horizontal axes, or an array of x-coordinates for vertical axes. Each coordinate itself represents a selected axis.

Container data

"/0/select/axes/nselected" (gint : Read)

The number of currently selected axes.

"/0/select/axes/0/x" (gdouble : Read)

The x-coordinate of first vertical axis.

"/0/select/axes/1/x" (gdouble : Read)

The x-coordinate of second vertical axis.

"/0/select/axes/0/y" (gdouble : Read)

The x-coordinate of first horizontal axis.

"/0/select/axes/1/y" (gdouble : Read)

The x-coordinate of second horizontal axis.

GwyLayerLines

GObject*    g_object_new(g_type_from_name("GwyLayerLines"));
    

Allows to select one or more lines of arbitrary orientation and length.

Properties

"max_lines" (gint : Read / Write)

The maximum number of lines user can select. Default number is 3 lines.

"line_numbers" (gboolean : Read / Write)

Whether line numbers should be displayed next to them. Default is to show line numbers.

Selection data

Selection data consists of an array of coordinates organized to (x0, y0, x1, y1) quadruples, each representing a one selected line.

Container data

"/0/select/lines/nselected" (gint : Read)

The number of currently selected lines.

"/0/select/lines/0/x0" (gdouble : Read)

The x-coordinate of the first point of first line.

"/0/select/lines/0/y0" (gdouble : Read)

The y-coordinate of the first point of first line.

"/0/select/lines/0/x1" (gdouble : Read)

The x-coordinate of the second point of first line.

"/0/select/lines/0/y1" (gdouble : Read)

The y-coordinate of the second point of first line.

"/0/select/lines/1/x0" (gdouble : Read)

The x-coordinate of the first point of second line.

"/0/select/lines/1/y0" (gdouble : Read)

The y-coordinate of the first point of second line.

"/0/select/lines/1/x1" (gdouble : Read)

The x-coordinate of the second point of second line.

"/0/select/lines/1/y1" (gdouble : Read)

The y-coordinate of the second point of second line.

GwyLayerPointer

GObject*    g_object_new(g_type_from_name("GwyLayerPointer"));
    

Allows to temporarily select a point, with no graphical representation on parent data view. Useful for value reading.

Properties

None.

Selection data

Selection data consists of a single (x, y) coordinate couple representing the selected point.

Container data

"/0/select/pointer/x" (gdouble : Read)

The x-coordinate of the selected point.

"/0/select/pointer/y" (gdouble : Read)

The y-coordinate of the selected point.

GwyLayerPoints

GObject*    g_object_new(g_type_from_name("GwyLayerPoints"));
    

Allows to select one or more points, represented by crosses on the parent data view.

Properties

"max_points" (gint : Read / Write)

The maximum number of points user can select. Default number is 3 points.

Selection data

Selection data consists of an array of coordinates organized to (x, y) couples, each representing a one selected point.

Container data

"/0/select/points/nselected" (gint : Read)

The number of currently selected points.

"/0/select/points/0/x" (gdouble : Read)

The x-coordinate of first point.

"/0/select/points/0/y" (gdouble : Read)

The y-coordinate of first point.

"/0/select/points/1/x" (gdouble : Read)

The x-coordinate of second point.

"/0/select/points/1/y" (gdouble : Read)

The y-coordinate of second point.

GwyLayerSelect

GObject*    g_object_new(g_type_from_name("GwyLayerSelect"));
    

Allows to select a one rectangle.

Properties

"is_crop" (gboolean : Read / Write)

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.

Selection data

Selection data consists of a single quadruple of coordinates (x0, y0, x1, y1), representing corners of selected rectangle.

Container data

"/0/select/rect/x0" (gdouble : Read)

The x-coordinate of first corner.

"/0/select/rect/y0" (gdouble : Read)

The y-coordinate of first corner.

"/0/select/rect/x1" (gdouble : Read)

The x-coordinate of second corner.

"/0/select/rect/y1" (gdouble : Read)

The y-coordinate of second corner.