ChamplainPathLayer

ChamplainPathLayer — A layer displaying line path between inserted ChamplainLocation objects

Synopsis

struct              ChamplainPathLayer;
ChamplainPathLayer * champlain_path_layer_new           (void);
void                champlain_path_layer_add_node       (ChamplainPathLayer *layer,
                                                         ChamplainLocation *location);
void                champlain_path_layer_remove_node    (ChamplainPathLayer *layer,
                                                         ChamplainLocation *location);
void                champlain_path_layer_remove_all     (ChamplainPathLayer *layer);
void                champlain_path_layer_insert_node    (ChamplainPathLayer *layer,
                                                         ChamplainLocation *location,
                                                         guint position);
GList *             champlain_path_layer_get_nodes      (ChamplainPathLayer *layer);
ClutterColor *      champlain_path_layer_get_fill_color (ChamplainPathLayer *layer);
void                champlain_path_layer_set_fill_color (ChamplainPathLayer *layer,
                                                         const ClutterColor *color);
ClutterColor *      champlain_path_layer_get_stroke_color
                                                        (ChamplainPathLayer *layer);
void                champlain_path_layer_set_stroke_color
                                                        (ChamplainPathLayer *layer,
                                                         const ClutterColor *color);
gboolean            champlain_path_layer_get_fill       (ChamplainPathLayer *layer);
void                champlain_path_layer_set_fill       (ChamplainPathLayer *layer,
                                                         gboolean value);
gboolean            champlain_path_layer_get_stroke     (ChamplainPathLayer *layer);
void                champlain_path_layer_set_stroke     (ChamplainPathLayer *layer,
                                                         gboolean value);
gdouble             champlain_path_layer_get_stroke_width
                                                        (ChamplainPathLayer *layer);
void                champlain_path_layer_set_stroke_width
                                                        (ChamplainPathLayer *layer,
                                                         gdouble value);
gboolean            champlain_path_layer_get_visible    (ChamplainPathLayer *layer);
void                champlain_path_layer_set_visible    (ChamplainPathLayer *layer,
                                                         gboolean value);
gboolean            champlain_path_layer_get_closed     (ChamplainPathLayer *layer);
void                champlain_path_layer_set_closed     (ChamplainPathLayer *layer,
                                                         gboolean value);
GList *             champlain_path_layer_get_dash       (ChamplainPathLayer *layer);
void                champlain_path_layer_set_dash       (ChamplainPathLayer *layer,
                                                         GList *dash_pattern);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----ChamplainLayer
                     +----ChamplainPathLayer

Implemented Interfaces

ChamplainPathLayer implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Properties

  "closed"                   gboolean              : Read / Write
  "fill"                     gboolean              : Read / Write
  "fill-color"               ClutterColor*         : Read / Write
  "stroke"                   gboolean              : Read / Write
  "stroke-color"             ClutterColor*         : Read / Write
  "stroke-width"             gdouble               : Read / Write
  "visible"                  gboolean              : Read / Write

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.

Details

struct ChamplainPathLayer

struct ChamplainPathLayer;

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

Since 0.10


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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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.

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

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.

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

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.

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.

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.

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.

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.

layer :

a ChamplainPathLayer

Returns :

the list. [transfer container][element-type guint]

Since 0.14


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.

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.14

Property Details

The "closed" property

  "closed"                   gboolean              : Read / Write

The shape is a closed path

Default value: FALSE

Since 0.10


The "fill" property

  "fill"                     gboolean              : Read / Write

The shape should be filled

Default value: FALSE

Since 0.10


The "fill-color" property

  "fill-color"               ClutterColor*         : Read / Write

The path's fill color

Since 0.10


The "stroke" property

  "stroke"                   gboolean              : Read / Write

The shape should be stroked

Default value: TRUE

Since 0.10


The "stroke-color" property

  "stroke-color"             ClutterColor*         : Read / Write

The path's stroke color

Since 0.10


The "stroke-width" property

  "stroke-width"             gdouble               : Read / Write

The path's stroke width (in pixels)

Allowed values: [0,100]

Default value: 2

Since 0.10


The "visible" property

  "visible"                  gboolean              : Read / Write

Wether the path is visible

Default value: TRUE

Since 0.10