## ChamplainPathLayer

ChamplainPathLayer — A layer displaying line path between inserted ChamplainLocation objects

## Functions

ChamplainPathLayer * | champlain_path_layer_new ()
void | champlain_path_layer_add_node ()
void | champlain_path_layer_remove_node ()
void | champlain_path_layer_remove_all ()
void | champlain_path_layer_insert_node ()
GList * | champlain_path_layer_get_nodes ()
ClutterColor * | champlain_path_layer_get_fill_color ()
void | champlain_path_layer_set_fill_color ()
ClutterColor * | champlain_path_layer_get_stroke_color ()
void | champlain_path_layer_set_stroke_color ()
gboolean | champlain_path_layer_get_fill ()
void | champlain_path_layer_set_fill ()
gboolean | champlain_path_layer_get_stroke ()
void | champlain_path_layer_set_stroke ()
gdouble | champlain_path_layer_get_stroke_width ()
void | champlain_path_layer_set_stroke_width ()
gboolean | champlain_path_layer_get_visible ()
void | champlain_path_layer_set_visible ()
gboolean | champlain_path_layer_get_closed ()
void | champlain_path_layer_set_closed ()
GList * | champlain_path_layer_get_dash ()
void | champlain_path_layer_set_dash ()

## Properties

gboolean | closed | Read / Write
gboolean | fill | Read / Write
ClutterColor * | fill-color | Read / Write
gboolean | stroke | Read / Write
ClutterColor * | stroke-color | Read / Write
double | stroke-width | Read / Write
gboolean | visible | Read / Write

## Types and Values

struct | ChamplainPathLayer

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ClutterActor
                ╰── ChamplainLayer
                    ╰── ChamplainPathLayer

## Implemented Interfaces

ChamplainPathLayer implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ChamplainExportable.

## Description

This layer shows a connection between inserted objects implementing the ChamplainLocation interface. This means that both ChamplainMarker objects and ChamplainCoordinate objects can be inserted into the layer. Of course, custom objects implementing the ChamplainLocation interface can be used as well.

## Functions

### champlain_path_layer_new ()

    ChamplainPathLayer *
    champlain_path_layer_new (void);

Creates a new instance of ChamplainPathLayer.

#### Returns

a new instance of ChamplainPathLayer.

Since: 0.10

### champlain_path_layer_add_node ()

    void
    champlain_path_layer_add_node (ChamplainPathLayer *layer,
                                   ChamplainLocation *location);

Adds a ChamplainLocation object to the layer. The node is prepended to the list.

#### Parameters

layer | a ChamplainPathLayer |
location | a ChamplainLocation |

Since: 0.10

### champlain_path_layer_remove_node ()

    void
    champlain_path_layer_remove_node (ChamplainPathLayer *layer,
                                      ChamplainLocation *location);

Removes the ChamplainLocation object from the layer.

#### Parameters

layer | a ChamplainPathLayer |
location | a ChamplainLocation |

Since: 0.10

### champlain_path_layer_remove_all ()

    void
    champlain_path_layer_remove_all (ChamplainPathLayer *layer);

Removes all ChamplainLocation objects from the layer.

#### Parameters

layer | a ChamplainPathLayer |

Since: 0.10

### champlain_path_layer_insert_node ()

    void
    champlain_path_layer_insert_node (ChamplainPathLayer *layer,
                                      ChamplainLocation *location,
                                      guint position);

Inserts a ChamplainLocation object to the specified position.

#### Parameters

layer | a ChamplainPathLayer |
location | a ChamplainLocation |
position | position in the list where the ChamplainLocation object should be inserted |

Since: 0.10

### champlain_path_layer_get_nodes ()

    GList *
    champlain_path_layer_get_nodes (ChamplainPathLayer *layer);

Gets a copy of the list of all ChamplainLocation objects inserted into the layer. You should free the list but not its contents.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

the list.

[transfer container][element-type ChamplainLocation]

Since: 0.10

### champlain_path_layer_get_fill_color ()

    ClutterColor *
    champlain_path_layer_get_fill_color (ChamplainPathLayer *layer);

Gets the path's fill color.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

the path's fill color.

Since: 0.10

### champlain_path_layer_set_fill_color ()

    void
    champlain_path_layer_set_fill_color (ChamplainPathLayer *layer,
                                         const ClutterColor *color);

Set the path's fill color.

#### Parameters

layer | a ChamplainPathLayer |
color | The path's fill color or NULL to reset to the default color. The color parameter is copied. | [allow-none]

Since: 0.10

### champlain_path_layer_get_stroke_color ()

    ClutterColor *
    champlain_path_layer_get_stroke_color (ChamplainPathLayer *layer);

Gets the path's stroke color.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

the path's stroke color.

Since: 0.10

### champlain_path_layer_set_stroke_color ()

    void
    champlain_path_layer_set_stroke_color (ChamplainPathLayer *layer,
                                           const ClutterColor *color);

Set the path's stroke color.

#### Parameters

layer | a ChamplainPathLayer |
color | The path's stroke color or NULL to reset to the default color. The color parameter is copied. | [allow-none]

Since: 0.10

### champlain_path_layer_get_fill ()

    gboolean
    champlain_path_layer_get_fill (ChamplainPathLayer *layer);

Checks whether the path is filled.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

TRUE if the path is filled, FALSE otherwise.

Since: 0.10

### champlain_path_layer_set_fill ()

    void
    champlain_path_layer_set_fill (ChamplainPathLayer *layer,
                                   gboolean value);

Sets the path to be filled

#### Parameters

layer | a ChamplainPathLayer |
value | if the path is filled |

Since: 0.10

### champlain_path_layer_get_stroke ()

    gboolean
    champlain_path_layer_get_stroke (ChamplainPathLayer *layer);

Checks whether the path is stroked.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

TRUE if the path is stroked, FALSE otherwise.

Since: 0.10

### champlain_path_layer_set_stroke ()

    void
    champlain_path_layer_set_stroke (ChamplainPathLayer *layer,
                                     gboolean value);

Sets the path to be stroked

#### Parameters

layer | a ChamplainPathLayer |
value | if the path is stroked |

Since: 0.10

### champlain_path_layer_get_stroke_width ()

    gdouble
    champlain_path_layer_get_stroke_width (ChamplainPathLayer *layer);

Gets the width of the stroke.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

the width of the stroke

Since: 0.10

### champlain_path_layer_set_stroke_width ()

    void
    champlain_path_layer_set_stroke_width (ChamplainPathLayer *layer,
                                           gdouble value);

Sets the width of the stroke

#### Parameters

layer | a ChamplainPathLayer |
value | the width of the stroke (in pixels) |

Since: 0.10

### champlain_path_layer_get_visible ()

    gboolean
    champlain_path_layer_get_visible (ChamplainPathLayer *layer);

Gets path visibility.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

TRUE when the path is visible, FALSE otherwise

Since: 0.10

### champlain_path_layer_set_visible ()

    void
    champlain_path_layer_set_visible (ChamplainPathLayer *layer,
                                      gboolean value);

Sets path visibility.

#### Parameters

layer | a ChamplainPathLayer |
value | TRUE to make the path visible |

Since: 0.10

### champlain_path_layer_get_closed ()

    gboolean
    champlain_path_layer_get_closed (ChamplainPathLayer *layer);

Gets information whether the path is closed.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

TRUE when the path is closed, FALSE otherwise

Since: 0.10

### champlain_path_layer_set_closed ()

    void
    champlain_path_layer_set_closed (ChamplainPathLayer *layer,
                                     gboolean value);

Makes the path closed.

#### Parameters

layer | a ChamplainPathLayer |
value | TRUE to make the path closed |

Since: 0.10

### champlain_path_layer_get_dash ()

    GList *
    champlain_path_layer_get_dash (ChamplainPathLayer *layer);

Returns the list of dash segment lengths.

#### Parameters

layer | a ChamplainPathLayer |

#### Returns

the list.

[transfer container][element-type guint]

Since: 0.12.4

### champlain_path_layer_set_dash ()

    void
    champlain_path_layer_set_dash (ChamplainPathLayer *layer,
                                   GList *dash_pattern);

Sets dashed line pattern in a way similar to `cairo_set_dash()` of cairo. This method supports only integer values for segment lengths. The values have to be passed inside the data pointer of the list (using the GUINT_TO_POINTER conversion)

Pass NULL to use solid line.

#### Parameters

layer | a ChamplainPathLayer |
dash_pattern | list of integer values representing lengths of dashes/spaces (see cairo documentation of `cairo_set_dash()`). | [element-type guint]

Since: 0.12.4

## Types and Values

### struct ChamplainPathLayer

    struct ChamplainPathLayer;

The ChamplainPathLayer structure contains only private data and should be accessed using the provided API

Since: 0.10

## Property Details

### The `“closed”` property

      “closed”                   gboolean

The shape is a closed path

Owner: ChamplainPathLayer

Flags: Read / Write

Default value: FALSE

Since: 0.10

### The `“fill”` property

      “fill”                     gboolean

The shape should be filled

Owner: ChamplainPathLayer

Flags: Read / Write

Default value: FALSE

Since: 0.10

### The `“fill-color”` property

      “fill-color”               ClutterColor *

The path's fill color

Owner: ChamplainPathLayer

Flags: Read / Write

Since: 0.10

### The `“stroke”` property

      “stroke”                   gboolean

The shape should be stroked

Owner: ChamplainPathLayer

Flags: Read / Write

Default value: TRUE

Since: 0.10

### The `“stroke-color”` property

      “stroke-color”             ClutterColor *

The path's stroke color

Owner: ChamplainPathLayer

Flags: Read / Write

Since: 0.10

### The `“stroke-width”` property

      “stroke-width”             double

The path's stroke width (in pixels)

Owner: ChamplainPathLayer

Flags: Read / Write

Allowed values: [0,100]

Default value: 2

Since: 0.10

### The `“visible”` property

      “visible”                  gboolean

Wether the path is visible

Owner: ChamplainPathLayer

Flags: Read / Write

Default value: TRUE

Since: 0.10