Shumate.PathLayer¶
- Subclasses:
None
Methods¶
- Inherited:
Shumate.Layer (1), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The Path is Closed |
||
r/w |
The shape is filled |
||
r/w |
The path’s fill color |
||
r/w |
The path’s outline color |
||
r/w |
The path’s outline width |
||
r/w |
The shape is stroked |
||
r/w |
The path’s stroke color |
||
r/w |
The path’s stroke width |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Shumate.PathLayer(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A layer displaying line path between inserted [iface`Location`] objects
This layer shows a connection between inserted objects implementing the [iface`Location`] interface. This means that both [class`Marker`] objects and [class`Coordinate`] objects can be inserted into the layer. Of course, custom objects implementing the [iface`Location`] interface can be used as well.
- classmethod new(viewport)¶
- Parameters:
viewport (
Shumate.Viewport
) – the [class`Viewport`]- Returns:
a new instance of [class`PathLayer`].
- Return type:
Creates a new instance of [class`PathLayer`].
- add_node(location)¶
- Parameters:
location (
Shumate.Location
) – a [iface`Location`]
Adds a [iface`Location`] object to the layer. The node is prepended to the list.
- get_closed()¶
-
Gets information whether the path is closed.
- get_fill()¶
-
Checks whether the path is filled.
- get_nodes()¶
- Returns:
the list
- Return type:
Gets a copy of the list of all [iface`Location`] objects inserted into the layer. You should free the list but not its contents.
- get_outline_color()¶
- Returns:
the path’s outline color.
- Return type:
Gets the path’s outline color.
- get_outline_width()¶
- Returns:
the width of the outline
- Return type:
Gets the width of the outline.
- get_stroke()¶
-
Checks whether the path is stroked.
- get_stroke_color()¶
- Returns:
the path’s stroke color.
- Return type:
Gets the path’s stroke color.
- get_stroke_width()¶
- Returns:
the width of the stroke
- Return type:
Gets the width of the stroke.
- insert_node(location, position)¶
- Parameters:
location (
Shumate.Location
) – a [iface`Location`]position (
int
) – position in the list where the [iface`Location`] object should be inserted
Inserts a [iface`Location`] object to the specified position.
- remove_all()¶
Removes all [iface`Location`] objects from the layer.
- remove_node(location)¶
- Parameters:
location (
Shumate.Location
) – a [iface`Location`]
Removes the [iface`Location`] object from the layer.
- set_dash(dash_pattern)¶
- Parameters:
dash_pattern ([
int
]) – list of integer values representing lengths of dashes/spaces (see cairo documentation ofcairo.Context.set_dash
())
Sets dashed line pattern in a way similar to
cairo.Context.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
None
to use solid line.
- set_fill_color(color)¶
- Parameters:
color (
Gdk.RGBA
orNone
) – The path’s fill color orNone
to reset to the default color. The color parameter is copied.
Set the path’s fill color.
- set_outline_color(color)¶
- Parameters:
color (
Gdk.RGBA
orNone
) – The path’s outline color orNone
to reset to the default color. The color parameter is copied.
Set the path’s outline color.
- set_outline_width(value)¶
- Parameters:
value (
float
) – the width of the outline (in pixels)
Sets the width of the outline
Property Details¶
- Shumate.PathLayer.props.closed¶
-
The shape is a closed path
- Shumate.PathLayer.props.fill¶
-
The shape should be filled
- Shumate.PathLayer.props.fill_color¶
-
The path’s fill color
- Shumate.PathLayer.props.outline_color¶
-
The path’s outline color
- Shumate.PathLayer.props.outline_width¶
-
The path’s outline width (in pixels)
- Shumate.PathLayer.props.stroke¶
-
The shape should be stroked
- Shumate.PathLayer.props.stroke_color¶
-
The path’s stroke color