Top |
ChamplainPathLayerChamplainPathLayer — A layer displaying line path between inserted ChamplainLocation objects |
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 |
GObject ╰── GInitiallyUnowned ╰── ClutterActor ╰── ChamplainLayer ╰── ChamplainPathLayer
ChamplainPathLayer implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ChamplainExportable.
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.
ChamplainPathLayer *
champlain_path_layer_new (void
);
Creates 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.
Since: 0.10
void champlain_path_layer_remove_node (ChamplainPathLayer *layer
,ChamplainLocation *location
);
Removes the ChamplainLocation object from the layer.
Since: 0.10
void
champlain_path_layer_remove_all (ChamplainPathLayer *layer
);
Removes all ChamplainLocation objects from the layer.
Since: 0.10
void champlain_path_layer_insert_node (ChamplainPathLayer *layer
,ChamplainLocation *location
,guint position
);
Inserts a ChamplainLocation object to the specified position.
layer |
||
location |
||
position |
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.
Since: 0.10
ClutterColor *
champlain_path_layer_get_fill_color (ChamplainPathLayer *layer
);
Gets 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.
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
ClutterColor *
champlain_path_layer_get_stroke_color (ChamplainPathLayer *layer
);
Gets 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.
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
gboolean
champlain_path_layer_get_fill (ChamplainPathLayer *layer
);
Checks whether the path is filled.
Since: 0.10
void champlain_path_layer_set_fill (ChamplainPathLayer *layer
,gboolean value
);
Sets the path to be filled
Since: 0.10
gboolean
champlain_path_layer_get_stroke (ChamplainPathLayer *layer
);
Checks whether the path is stroked.
Since: 0.10
void champlain_path_layer_set_stroke (ChamplainPathLayer *layer
,gboolean value
);
Sets the path to be stroked
Since: 0.10
gdouble
champlain_path_layer_get_stroke_width (ChamplainPathLayer *layer
);
Gets 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
Since: 0.10
gboolean
champlain_path_layer_get_visible (ChamplainPathLayer *layer
);
Gets path visibility.
Since: 0.10
void champlain_path_layer_set_visible (ChamplainPathLayer *layer
,gboolean value
);
Sets path visibility.
Since: 0.10
gboolean
champlain_path_layer_get_closed (ChamplainPathLayer *layer
);
Gets information whether the path is closed.
Since: 0.10
void champlain_path_layer_set_closed (ChamplainPathLayer *layer
,gboolean value
);
Makes the path closed.
Since: 0.10
GList *
champlain_path_layer_get_dash (ChamplainPathLayer *layer
);
Returns the list of dash segment lengths.
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.
layer |
||
dash_pattern |
list of integer values representing lengths
of dashes/spaces (see cairo documentation of |
[element-type guint] |
Since: 0.12.4
struct ChamplainPathLayer;
The ChamplainPathLayer structure contains only private data and should be accessed using the provided API
Since: 0.10
“closed”
property“closed” gboolean
The shape is a closed path
Owner: ChamplainPathLayer
Flags: Read / Write
Default value: FALSE
Since: 0.10
“fill”
property“fill” gboolean
The shape should be filled
Owner: ChamplainPathLayer
Flags: Read / Write
Default value: FALSE
Since: 0.10
“fill-color”
property“fill-color” ClutterColor *
The path's fill color
Owner: ChamplainPathLayer
Flags: Read / Write
Since: 0.10
“stroke”
property“stroke” gboolean
The shape should be stroked
Owner: ChamplainPathLayer
Flags: Read / Write
Default value: TRUE
Since: 0.10
“stroke-color”
property“stroke-color” ClutterColor *
The path's stroke color
Owner: ChamplainPathLayer
Flags: Read / Write
Since: 0.10
“stroke-width”
property“stroke-width” gdouble
The path's stroke width (in pixels)
Owner: ChamplainPathLayer
Flags: Read / Write
Allowed values: [0,100]
Default value: 2
Since: 0.10
“visible”
property“visible” gboolean
Wether the path is visible
Owner: ChamplainPathLayer
Flags: Read / Write
Default value: TRUE
Since: 0.10