![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|
Standard Vector LayersStandard Vector Layers — Vector layers that are distributed with Gwyddion |
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, therefore each module also defines its own selection object type determining the format of selection data. All selections are subclasses of GwySelection. By convention, layer type Foo is called GwyLayerFoo and the corresponding selection type GwySelectionFoo.
Layers and selections sometimes have additional object properties not present in the base classes, these are described here too.
GObject* g_object_new(g_type_from_name("GwyLayerAxis"), NULL); GObject* g_object_new(g_type_from_name("GwySelectionAxis"), NULL);
Layer 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.
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.
"orientation " (GwyOrientation : Read / Write) |
Line orientation: horizontal or vertical. Default orientation is horizontal. |
GObject* g_object_new(g_type_from_name("GwyLayerEllipse"), NULL); GObject* g_object_new(g_type_from_name("GwySelectionEllipse"), NULL);
Layer allows to select a number of ellipses.
Selection data consists of quadruples of coordinates (x0, y0, x1, y1), each representing one selected ellipse, where x0 and y0 are coordinates of one bounding box corner and x1 and y1 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.
GObject* g_object_new(g_type_from_name("GwyLayerLine"), NULL); GObject* g_object_new(g_type_from_name("GwySelectionLine"), NULL);
Layer allows to select one or more lines of arbitrary orientation and length, optionally can display line numbers next to each line.
Selection data consists of quadruples of coordinates (x0, y0, x1, y1), each representing one selected line, where x0 and y0 are coordinates of one line end and x1 and y1 of the other end.
GObject* g_object_new(g_type_from_name("GwyLayerPoint"), NULL); GObject* g_object_new(g_type_from_name("GwySelectionPoint"), NULL);
Layer allows to select 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).
Selection data consists of coordinate pairs (x, y) representing selected points.
GObject* g_object_new(g_type_from_name("GwyLayerRectangle"), NULL); GObject* g_object_new(g_type_from_name("GwySelectionRectangle"), NULL);
Layer allows to select a number of rectangles, that can be drawn with a couple of fancy/special styles.
Selection data consists of quadruples of coordinates (x0, y0, x1, y1), each representing one selected rectangle, where x0 and y0 are coordinates of one corner and x1 and y1 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.