## GwySelectionPath

GwySelectionPath — Path selection

## Functions

GwySelection * | gwy_selection_path_new ()
void | gwy_selection_path_set_slackness ()
gdouble | gwy_selection_path_get_slackness ()
void | gwy_selection_path_set_closed ()
gboolean | gwy_selection_path_get_closed ()

## Properties

gboolean | closed | Read / Write
double | slackness | Read / Write

## Types and Values

struct | GwySelectionPath
struct | GwySelectionPathClass

## Object Hierarchy

        GObject
        ╰── GwySelection
            ╰── GwySelectionPath

## Implemented Interfaces

GwySelectionPath implements GwySerializable.

## Includes

    #include <libgwyddion/gwyddion.h>

## Description

GwySelectionPath represents a free-form spline path. Unlike most other selections, the entire selection is one path. Individual objects are points on the path. Selection data consist of pairs of coordinates (x, y) of control points on path, in order from the beginning to end.

## Functions

### gwy_selection_path_new()

    GwySelection *
    gwy_selection_path_new (void);

Creates a new path selection.

#### Returns

A new selection object.

### gwy_selection_path_set_slackness()

    void
    gwy_selection_path_set_slackness (GwySelectionPath *selection,
                                      gdouble slackness);

Sets the curve slackness of a path selection.

Slackness of zero means the curve is tight and the segments connecting the points are straight. The default value of 1/√2 gives naturally looking curves. Slackness of 1 means quite slack curves, whereas larger values than 1 more or less means trying to stuff more curve between the points than natural.

#### Parameters

selection | A path selection. |
slackness | Curve slackness (from 0 to √2). |

### gwy_selection_path_get_slackness()

    gdouble
    gwy_selection_path_get_slackness (GwySelectionPath *selection);

Gets the curve slackness of a path selection.

See `gwy_selection_path_set_slackness()` for more details.

#### Parameters

selection | A path selection. |

#### Returns

The slackness value.

### gwy_selection_path_set_closed()

    void
    gwy_selection_path_set_closed (GwySelectionPath *selection,
                                   gboolean closed);

Changes whether a path selection is a closed curve.

#### Parameters

selection | A path selection. |
closed | `TRUE` for a closed curve; `FALSE` for a curve with two open ends. |

### gwy_selection_path_get_closed()

    gboolean
    gwy_selection_path_get_closed (GwySelectionPath *selection);

Reports whether a path selection is a closed curve.

#### Parameters

selection | A path selection. |

#### Returns

`TRUE` if it is closed; `FALSE` if it is open-ended.

## Types and Values

### struct GwySelectionPath

    struct GwySelectionPath;

### struct GwySelectionPathClass

    struct GwySelectionPathClass {
        GwySelectionClass parent_class;
    };

## Property Details

### The `“closed”` property

      “closed”                   gboolean

Whether the curve is closed, as opposed to open-ended.

Owner: GwySelectionPath

Flags: Read / Write

Default value: FALSE

### The `“slackness”` property

      “slackness”                double

Slackness parameter of the spline curve.

Owner: GwySelectionPath

Flags: Read / Write

Allowed values: [0,1.41421]

Default value: 0.707107