![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
ChamplainPathLayerChamplainPathLayer — A layer displaying line path between inserted ChamplainLocation objects |
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
);
GObject +----GInitiallyUnowned +----ClutterActor +----ChamplainLayer +----ChamplainPathLayer
ChamplainPathLayer implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.
"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
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.
struct ChamplainPathLayer;
The ChamplainPathLayer structure contains only private data and should be accessed using the provided API
Since 0.10
ChamplainPathLayer * champlain_path_layer_new (void
);
Creates a new instance of ChamplainPathLayer.
Returns : |
a new instance of ChamplainPathLayer. |
Since 0.10
void champlain_path_layer_add_node (ChamplainPathLayer *layer
,ChamplainLocation *location
);
Adds a ChamplainLocation object to the layer. The node is prepended to the list.
|
a ChamplainPathLayer |
|
a ChamplainLocation |
Since 0.10
void champlain_path_layer_remove_node (ChamplainPathLayer *layer
,ChamplainLocation *location
);
Removes the ChamplainLocation object from the layer.
|
a ChamplainPathLayer |
|
a ChamplainLocation |
Since 0.10
void champlain_path_layer_remove_all (ChamplainPathLayer *layer
);
Removes all ChamplainLocation objects from the layer.
|
a ChamplainPathLayer |
Since 0.10
void champlain_path_layer_insert_node (ChamplainPathLayer *layer
,ChamplainLocation *location
,guint position
);
Inserts a ChamplainLocation object to the specified position.
|
a ChamplainPathLayer |
|
a ChamplainLocation |
|
position in the list where the ChamplainLocation object should be inserted |
Since 0.10
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.
|
a ChamplainPathLayer |
Returns : |
the list. [transfer container][element-type ChamplainLocation] |
Since 0.10
ClutterColor * champlain_path_layer_get_fill_color (ChamplainPathLayer *layer
);
Gets the path's fill color.
|
a ChamplainPathLayer |
Returns : |
the path's fill color. |
Since 0.10
void champlain_path_layer_set_fill_color (ChamplainPathLayer *layer
,const ClutterColor *color
);
Set the path's fill color.
|
a ChamplainPathLayer |
|
The path's fill color or NULL to reset to the default color. The color parameter is copied. [allow-none] |
Since 0.10
ClutterColor * champlain_path_layer_get_stroke_color
(ChamplainPathLayer *layer
);
Gets the path's stroke color.
|
a ChamplainPathLayer |
Returns : |
the path's stroke color. |
Since 0.10
void champlain_path_layer_set_stroke_color (ChamplainPathLayer *layer
,const ClutterColor *color
);
Set the path's stroke color.
|
a ChamplainPathLayer |
|
The path's stroke color or NULL to reset to the default color. The color parameter is copied. [allow-none] |
Since 0.10
gboolean champlain_path_layer_get_fill (ChamplainPathLayer *layer
);
Checks whether the path is filled.
|
a ChamplainPathLayer |
Returns : |
TRUE if the path is filled, FALSE otherwise. |
Since 0.10
void champlain_path_layer_set_fill (ChamplainPathLayer *layer
,gboolean value
);
Sets the path to be filled
|
a ChamplainPathLayer |
|
if the path is filled |
Since 0.10
gboolean champlain_path_layer_get_stroke (ChamplainPathLayer *layer
);
Checks whether the path is stroked.
|
a ChamplainPathLayer |
Returns : |
TRUE if the path is stroked, FALSE otherwise. |
Since 0.10
void champlain_path_layer_set_stroke (ChamplainPathLayer *layer
,gboolean value
);
Sets the path to be stroked
|
a ChamplainPathLayer |
|
if the path is stroked |
Since 0.10
gdouble champlain_path_layer_get_stroke_width
(ChamplainPathLayer *layer
);
Gets the width of the stroke.
|
a ChamplainPathLayer |
Returns : |
the width of the stroke |
Since 0.10
void champlain_path_layer_set_stroke_width (ChamplainPathLayer *layer
,gdouble value
);
Sets the width of the stroke
|
a ChamplainPathLayer |
|
the width of the stroke (in pixels) |
Since 0.10
gboolean champlain_path_layer_get_visible (ChamplainPathLayer *layer
);
Gets path visibility.
|
a ChamplainPathLayer |
Returns : |
TRUE when the path is visible, FALSE otherwise |
Since 0.10
void champlain_path_layer_set_visible (ChamplainPathLayer *layer
,gboolean value
);
Sets path visibility.
|
a ChamplainPathLayer |
|
TRUE to make the path visible |
Since 0.10
gboolean champlain_path_layer_get_closed (ChamplainPathLayer *layer
);
Gets information whether the path is closed.
|
a ChamplainPathLayer |
Returns : |
TRUE when the path is closed, FALSE otherwise |
Since 0.10
void champlain_path_layer_set_closed (ChamplainPathLayer *layer
,gboolean value
);
Makes the path closed.
|
a ChamplainPathLayer |
|
TRUE to make the path closed |
Since 0.10
GList * champlain_path_layer_get_dash (ChamplainPathLayer *layer
);
Returns the list of dash segment lengths.
|
a ChamplainPathLayer |
Returns : |
the list. [transfer container][element-type guint] |
Since 0.12.4
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.
|
a ChamplainPathLayer |
|
list of integer values representing lengths
of dashes/spaces (see cairo documentation of cairo_set_dash() ). [element-type guint]
|
Since 0.12.4
"closed"
property"closed" gboolean : Read / Write
The shape is a closed path
Default value: FALSE
Since 0.10
"fill"
property"fill" gboolean : Read / Write
The shape should be filled
Default value: FALSE
Since 0.10
"fill-color"
property"fill-color" ClutterColor* : Read / Write
The path's fill color
Since 0.10
"stroke"
property"stroke" gboolean : Read / Write
The shape should be stroked
Default value: TRUE
Since 0.10
"stroke-color"
property"stroke-color" ClutterColor* : Read / Write
The path's stroke color
Since 0.10
"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
"visible"
property"visible" gboolean : Read / Write
Wether the path is visible
Default value: TRUE
Since 0.10