Gwyddion – Free SPM (AFM, SNOM/NSOM, STM, MFM, …) data analysis software

GwyLayerBasic (HEAD)

GwyLayerBasic — Display data colored with a gradient

Functions

GwyPixmapLayer * gwy_layer_basic_new ()
void gwy_layer_basic_get_range ()
GwyLayerBasicRangeType gwy_layer_basic_get_range_type ()
void gwy_layer_basic_set_gradient_key ()
const gchar * gwy_layer_basic_get_gradient_key ()
void gwy_layer_basic_set_presentation_key ()
const gchar * gwy_layer_basic_get_presentation_key ()
gboolean gwy_layer_basic_get_has_presentation ()
void gwy_layer_basic_set_min_max_key ()
const gchar * gwy_layer_basic_get_min_max_key ()
void gwy_layer_basic_set_range_type_key ()
const gchar * gwy_layer_basic_get_range_type_key ()

Properties

GwyLayerBasicRangeType default-range-type Read / Write
gchar * gradient-key Read / Write
gchar * min-max-key Read / Write
gchar * presentation-key Read / Write
gchar * range-type-key Read / Write

Signals

void presentation-switched Run First

Types and Values

struct GwyLayerBasic
struct GwyLayerBasicClass

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GwyDataViewLayer
                ╰── GwyPixmapLayer
                    ╰── GwyLayerBasic

Includes

#include <libgwydgets/gwydgets.h>

Description

GwyLayerBasic is a data view layer that can paint data with a false color gradient. It is not normally usable outside a GwyDataView.

The layer takes all infromation from its parent GwyDataView, therefore you do not set its properties directly, but you change them in the corresponding GwyContainer and/or use methods like gwy_layer_basic_set_gradient_key() to make the layer read a different value from the container.

Several types of mapping of data to colors are available, see GwyLayerBasicRangeType for their description.

Functions

gwy_layer_basic_new ()

GwyPixmapLayer *
gwy_layer_basic_new (void);

Creates a new basic data displaying layer.

Returns

The newly created layer.

gwy_layer_basic_get_range ()

void
gwy_layer_basic_get_range (GwyLayerBasic *basic_layer,
                           gdouble *min,
                           gdouble *max);

Gets the range colors are mapped from in current mode.

This function does not take presentations into account. It always returns ther range corresponding to the underlying data even if a presentation is shown instead.

Parameters

basic_layer

A basic data view layer.

 

min

Location to store range minimum to.

 

max

Location to store range maximum to.

 

gwy_layer_basic_get_range_type ()

GwyLayerBasicRangeType
gwy_layer_basic_get_range_type (GwyLayerBasic *basic_layer);

Gets the current color mapping mode.

Parameters

basic_layer

A basic data view layer.

 

Returns

The current color mapping mode.

Since: 2.7

gwy_layer_basic_set_gradient_key ()

void
gwy_layer_basic_set_gradient_key (GwyLayerBasic *basic_layer,
                                  const gchar *key);

Sets the container key of the colour gradient to use to visualize data.

Parameters

basic_layer

A basic data view layer.

 

key

Container string key identifying the color gradient to use.

 

gwy_layer_basic_get_gradient_key ()

const gchar *
gwy_layer_basic_get_gradient_key (GwyLayerBasic *basic_layer);

Gets key identifying color gradient.

Parameters

basic_layer

A basic data view layer.

 

Returns

The string key, or NULL if it isn't set.

gwy_layer_basic_set_presentation_key ()

void
gwy_layer_basic_set_presentation_key (GwyLayerBasic *basic_layer,
                                      const gchar *key);

Sets the container key of the data field to actually display by a basic layer.

The data field set with gwy_pixmap_layer_get_data_key() is used to obtain values, it determines physical dimensions, etc. When a data field is set with this method, it is displayed instead of the actual data.

Parameters

basic_layer

A basic data view layer.

 

key

Container string key identifying the data field to actually display.

 

gwy_layer_basic_get_presentation_key ()

const gchar *
gwy_layer_basic_get_presentation_key (GwyLayerBasic *basic_layer);

Gets the key identifying data field this pixmap layer actually displays.

See gwy_layer_basic_set_presentation_key() for details.

Parameters

basic_layer

A basic data view layer.

 

Returns

The string key, or NULL if it isn't set.

gwy_layer_basic_get_has_presentation ()

gboolean
gwy_layer_basic_get_has_presentation (GwyLayerBasic *basic_layer);

Tests whether a basic layer displays a presentation instead of the data.

Parameters

basic_layer

A basic data view layer.

 

Returns

TRUE if the layer has a presentation, FALSE it it displays the data.

gwy_layer_basic_set_min_max_key ()

void
gwy_layer_basic_set_min_max_key (GwyLayerBasic *basic_layer,
                                 const gchar *prefix);

Sets basic layer fixed range minimum and maximum.

Parameters

basic_layer

A basic data view layer.

 

prefix

Prefix of keys identifying minimum and maximum values for fixed range, "/min" and "/max" is appended to it to get the individual minimum and maximum keys.

 

gwy_layer_basic_get_min_max_key ()

const gchar *
gwy_layer_basic_get_min_max_key (GwyLayerBasic *basic_layer);

Gets prefix identifying fixed range minimum and maximum.

Parameters

basic_layer

A basic data view layer.

 

Returns

The prefix, or NULL if it isn't set.

gwy_layer_basic_set_range_type_key ()

void
gwy_layer_basic_set_range_type_key (GwyLayerBasic *basic_layer,
                                    const gchar *key);

Sets the container key of the color range mapping type to use to visualize data.

Parameters

basic_layer

A basic data view layer.

 

key

Container string key identifying the range type to use.

 

gwy_layer_basic_get_range_type_key ()

const gchar *
gwy_layer_basic_get_range_type_key (GwyLayerBasic *basic_layer);

Gets key identifying color range mapping type.

Parameters

basic_layer

A basic data view layer.

 

Returns

The string key, or NULL if it isn't set.

Types and Values

struct GwyLayerBasic

struct GwyLayerBasic;

struct GwyLayerBasicClass

struct GwyLayerBasicClass {
    GwyPixmapLayerClass parent_class;

    /* signals */
    void (*presentation_switched)(GwyLayerBasic *basic_layer);

    void (*reserved1)(void);
    void (*reserved2)(void);
};

Property Details

The “default-range-type” property

  “default-range-type”       GwyLayerBasicRangeType

The :default-range-type-key property determines the color mapping range type used when the type is unset in the container.

Flags: Read / Write

Default value: GWY_LAYER_BASIC_RANGE_FULL

Since: 2.7

The “gradient-key” property

  “gradient-key”             gchar *

The :gradient-key property is the container key used to identify GwyGradient data is colored with.

Flags: Read / Write

Default value: NULL

The “min-max-key” property

  “min-max-key”              gchar *

The :min-max-key property is the container key prefix used to identify fixed range minimum and maximum.

Flags: Read / Write

Default value: NULL

The “presentation-key” property

  “presentation-key”         gchar *

The :presentation-key property is the container key used to identify presentation data field .

Flags: Read / Write

Default value: NULL

The “range-type-key” property

  “range-type-key”           gchar *

The :range-type-key property is the container key used to identify color range type.

Flags: Read / Write

Default value: NULL

Signal Details

The “presentation-switched” signal

void
user_function (GwyLayerBasic *gwydataview,
               gpointer       user_data)

The ::presentation-switched signal is emitted when the presentation state changes, that is when a layer which displayed data directly starts displaying a presentation, or conversely when it stops displaying a presentation.

Parameters

gwydataview

The GwyLayerBasic which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First

See Also

GwyDataView -- data display widget, GwyLayerMask -- display data as color mask, GwyGradient -- color gradient representation

© David Nečas and Petr Klapetek

Home Download News Features Screenshots Documentation Communicate Participate Resources Publications Applications Site Map

Valid XHTML 1.0 Valid CSS