GwyLayerEllipse: Gwyddion Widgets Library Reference Manual

## GwyLayerEllipse GwyLayerEllipse — Data view layer for selections of ellipses |

## Functions

GwyVectorLayer * | gwy_layer_ellipse_new ()
gboolean | gwy_layer_ellipse_get_draw_reflection ()
void | gwy_layer_ellipse_set_draw_reflection ()
gboolean | gwy_layer_ellipse_get_snap_to_center ()
void | gwy_layer_ellipse_set_snap_to_center ()

## Properties

gboolean | draw-reflection | Read / Write
gboolean | snap-to-center | Read / Write

## Types and Values

struct | GwyLayerEllipse
struct | GwyLayerEllipseClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GwyDataViewLayer
                ╰── GwyVectorLayer
                    ╰── GwyLayerEllipse

## Includes

    #include <libgwyui/gwyui.h>

## Description

GwyLayerEllipse allows selection of ellipses oriented along the cardinal axes, corresponding to elliptic image areas which can be extracted and processed using GwyField functions. It uses GwySelectionEllipse selection type.

## Functions

### gwy_layer_ellipse_new()

    GwyVectorLayer *
    gwy_layer_ellipse_new (void);

Creates a new ellipse vector layer.

#### Returns

A newly created ellipse vector layer.

### gwy_layer_ellipse_get_draw_reflection()

    gboolean
    gwy_layer_ellipse_get_draw_reflection (GwyLayerEllipse *layer);

Reports whether a ellipse vector layer is drawn with reflection.

#### Parameters

layer | A ellipse vector layer. |

#### Returns

`TRUE` if second ellipses are drawn, reflected about the image centre; `FALSE` for normal ellipses.

### gwy_layer_ellipse_set_draw_reflection()

    void
    gwy_layer_ellipse_set_draw_reflection (GwyLayerEllipse *layer,
                                           gboolean draw_reflection);

Sets whether a ellipse vector layer is drawn with a reflection.

#### Parameters

layer | A ellipse vector layer. |
draw_reflection | `TRUE` to draw second ellipses, reflected about the image centre; `FALSE` for normal ellipses. |

### gwy_layer_ellipse_get_snap_to_center()

    gboolean
    gwy_layer_ellipse_get_snap_to_center (GwyLayerEllipse *layer);

Reports whether a ellipse vector layer has the centre fixed to the image centre.

#### Parameters

layer | A ellipse vector layer. |

#### Returns

`TRUE` if ellipse centres are fixed to the centre; `FALSE` if they are unconstrained.

### gwy_layer_ellipse_set_snap_to_center()

    void
    gwy_layer_ellipse_set_snap_to_center (GwyLayerEllipse *layer,
                                          gboolean snap_to_center);

Sets whether a ellipse vector layer has the centre fixed to the image centre.

#### Parameters

layer | A ellipse vector layer. |
snap_to_center | `TRUE` to fix oellipses centres to the image centre; `FALSE` to leave them unconstrained. |

## Types and Values

### struct GwyLayerEllipse

    struct GwyLayerEllipse;

### struct GwyLayerEllipseClass

    struct GwyLayerEllipseClass {
        GwyVectorLayerClass parent_class;
    };

## Property Details

### The `“draw-reflection”` property

      “draw-reflection”          gboolean

Whether central reflection of selection should be drawn too.

Owner: GwyLayerEllipse

Flags: Read / Write

Default value: FALSE

### The `“snap-to-center”` property

      “snap-to-center”           gboolean

Whether the selection centre should be fixed to the image centre.

Owner: GwyLayerEllipse

Flags: Read / Write

Default value: FALSE