GwyLayerLattice

GwyLayerLattice — Data view layer for lattice-wise selections

Functions

Properties

guint n-lines Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GwyDataViewLayer
            ╰── GwyVectorLayer
                ╰── GwyLayerLattice

Includes

#include <libgwydgets/gwydgets.h>

Description

GwyLayerLattice allows selection of two-dimensional lattices. It uses GwySelectionLattice selection type.

The lattice is drawn over an area given by GwyLayerLattice:n-lines. However, it can be rotated and streched by clicking and dragging anywhere in the plane, not just in the region covered by the lines. Therefore, the layer is only useful with a single latice selection as only the first selection object can be edited.

The lattice selection needs to be initialised. The layer can only edit a lattice selection; it cannot create one from scratch.

Functions

gwy_layer_lattice_new()

GwyVectorLayer *
gwy_layer_lattice_new (void);

Creates a new lattice vector layer.

Returns

A newly created lattice vector layer.


gwy_layer_lattice_get_n_lines()

gint
gwy_layer_lattice_get_n_lines (GwyLayerLattice *layer);

Gets the number of lattice lines of a lattice vector layer.

Parameters

layer

A lattice vector layer.

 

Returns

The number of lines.


gwy_layer_lattice_set_n_lines()

void
gwy_layer_lattice_set_n_lines (GwyLayerLattice *layer,
                               gint n_lines);

Sets the number of lattice lines of a lattice vector layer.

The basis vectors are always drawn, with both signs (i.e. forming a cross). If n_lines is zero nothing else is drawn. Otherwise n_lines extra lines are drawn to each side of the central lines to render the lattice.

Parameters

layer

A lattice vector layer.

 

n_lines

Number of lines.

 

Types and Values

struct GwyLayerLattice

struct GwyLayerLattice;

struct GwyLayerLatticeClass

struct GwyLayerLatticeClass {
    GwyVectorLayerClass parent_class;
};

Property Details

The “n-lines” property

  “n-lines”                  guint

Number of lattice lines to draw beside the central ones.

Owner: GwyLayerLattice

Flags: Read / Write

Allowed values: <= 1024

Default value: 12