Top |
ChamplainPathLayerChamplainPathLayer — A layer displaying line path between inserted ChamplainLocation objects |
Functions
Properties
gboolean | closed | Read / Write |
gboolean | fill | Read / Write |
ClutterColor * | fill-color | Read / Write |
gboolean | stroke | Read / Write |
ClutterColor * | stroke-color | Read / Write |
gdouble | stroke-width | Read / Write |
gboolean | visible | Read / Write |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── ClutterActor ╰── ChamplainLayer ╰── ChamplainPathLayer
Implemented Interfaces
ChamplainPathLayer implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.
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.
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.
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.
Since 0.10
champlain_path_layer_remove_all ()
void
champlain_path_layer_remove_all (ChamplainPathLayer *layer
);
Removes all ChamplainLocation objects from the layer.
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 |
||
location |
||
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.
Since 0.10
champlain_path_layer_get_fill_color ()
ClutterColor *
champlain_path_layer_get_fill_color (ChamplainPathLayer *layer
);
Gets 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 |
||
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.
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 |
||
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.
Since 0.10
champlain_path_layer_set_fill ()
void champlain_path_layer_set_fill (ChamplainPathLayer *layer
,gboolean value
);
Sets the path to be filled
Since 0.10
champlain_path_layer_get_stroke ()
gboolean
champlain_path_layer_get_stroke (ChamplainPathLayer *layer
);
Checks whether the path is stroked.
Since 0.10
champlain_path_layer_set_stroke ()
void champlain_path_layer_set_stroke (ChamplainPathLayer *layer
,gboolean value
);
Sets the path to be 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.
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
Since 0.10
champlain_path_layer_get_visible ()
gboolean
champlain_path_layer_get_visible (ChamplainPathLayer *layer
);
Gets path visibility.
Since 0.10
champlain_path_layer_set_visible ()
void champlain_path_layer_set_visible (ChamplainPathLayer *layer
,gboolean value
);
Sets path visibility.
Since 0.10
champlain_path_layer_get_closed ()
gboolean
champlain_path_layer_get_closed (ChamplainPathLayer *layer
);
Gets information whether the path is closed.
Since 0.10
champlain_path_layer_set_closed ()
void champlain_path_layer_set_closed (ChamplainPathLayer *layer
,gboolean value
);
Makes 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.
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 |
||
dash_pattern |
list of integer values representing lengths
of dashes/spaces (see cairo documentation of |
[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
Flags: Read / Write
Default value: FALSE
Since 0.10
The “fill”
property
“fill” gboolean
The shape should be filled
Flags: Read / Write
Default value: FALSE
Since 0.10
The “fill-color”
property
“fill-color” ClutterColor *
The path's fill color
Flags: Read / Write
Since 0.10
The “stroke”
property
“stroke” gboolean
The shape should be stroked
Flags: Read / Write
Default value: TRUE
Since 0.10
The “stroke-color”
property
“stroke-color” ClutterColor *
The path's stroke color
Flags: Read / Write
Since 0.10
The “stroke-width”
property
“stroke-width” gdouble
The path's stroke width (in pixels)
Flags: Read / Write
Allowed values: [0,100]
Default value: 2
Since 0.10
The “visible”
property
“visible” gboolean
Wether the path is visible
Flags: Read / Write
Default value: TRUE
Since 0.10