Champlain.PathLayer

g Atk.ImplementorIface Atk.ImplementorIface Clutter.Actor Clutter.Actor Atk.ImplementorIface->Clutter.Actor Champlain.Exportable Champlain.Exportable Champlain.PathLayer Champlain.PathLayer Champlain.Exportable->Champlain.PathLayer Champlain.Layer Champlain.Layer Champlain.Layer->Champlain.PathLayer Clutter.Actor->Champlain.Layer Clutter.Animatable Clutter.Animatable Clutter.Animatable->Clutter.Actor Clutter.Container Clutter.Container Clutter.Container->Clutter.Actor Clutter.Scriptable Clutter.Scriptable Clutter.Scriptable->Clutter.Actor GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface GObject.GInterface->Champlain.Exportable GObject.GInterface->Clutter.Animatable GObject.GInterface->Clutter.Container GObject.GInterface->Clutter.Scriptable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.Actor GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

Champlain.Layer (2), Clutter.Actor (238), GObject.Object (37), Clutter.Animatable (5), Clutter.Container (17), Clutter.Scriptable (4), Champlain.Exportable (2)

Structs:

GObject.ObjectClass (5)

class

new ()

add_node (location)

get_closed ()

get_dash ()

get_fill ()

get_fill_color ()

get_nodes ()

get_stroke ()

get_stroke_color ()

get_stroke_width ()

get_visible ()

insert_node (location, position)

remove_all ()

remove_node (location)

set_closed (value)

set_dash (dash_pattern)

set_fill (value)

set_fill_color (color)

set_stroke (value)

set_stroke_color (color)

set_stroke_width (value)

set_visible (value)

Virtual Methods

Inherited:

Champlain.Layer (2), Clutter.Actor (35), GObject.Object (7), Clutter.Animatable (5), Clutter.Container (13), Clutter.Scriptable (4), Champlain.Exportable (2)

Properties

Inherited:

Clutter.Actor (82), Champlain.Exportable (1)

Name

Type

Flags

Short Description

closed

bool

r/w

The Path is Closed

fill

bool

r/w

The shape is filled

fill-color

Clutter.Color

r/w

The path’s fill color

stroke

bool

r/w

The shape is stroked

stroke-color

Clutter.Color

r/w

The path’s stroke color

stroke-width

float

r/w

The path’s stroke width

Signals

Inherited:

Clutter.Actor (26), GObject.Object (1), Clutter.Container (3)

Fields

Inherited:

Clutter.Actor (26), GObject.Object (1), Clutter.Container (3)

Name

Type

Access

Description

parent

Champlain.Layer

r

Class Details

class Champlain.PathLayer(**kwargs)
Bases:

Champlain.Layer, Champlain.Exportable

Abstract:

No

Structure:

Champlain.PathLayerClass

The Champlain.PathLayer structure contains only private data and should be accessed using the provided API

New in version 0.10.

classmethod new()
Returns:

a new instance of Champlain.PathLayer.

Return type:

Champlain.PathLayer

Creates a new instance of Champlain.PathLayer.

New in version 0.10.

add_node(location)
Parameters:

location (Champlain.Location) – a Champlain.Location

Adds a Champlain.Location object to the layer. The node is prepended to the list.

New in version 0.10.

get_closed()
Returns:

True when the path is closed, False otherwise

Return type:

bool

Gets information whether the path is closed.

New in version 0.10.

get_dash()
Returns:

the list

Return type:

[int]

Returns the list of dash segment lengths.

New in version 0.12.4.

get_fill()
Returns:

True if the path is filled, False otherwise.

Return type:

bool

Checks whether the path is filled.

New in version 0.10.

get_fill_color()
Returns:

the path’s fill color.

Return type:

Clutter.Color

Gets the path’s fill color.

New in version 0.10.

get_nodes()
Returns:

the list

Return type:

[Champlain.Location]

Gets a copy of the list of all Champlain.Location objects inserted into the layer. You should free the list but not its contents.

New in version 0.10.

get_stroke()
Returns:

True if the path is stroked, False otherwise.

Return type:

bool

Checks whether the path is stroked.

New in version 0.10.

get_stroke_color()
Returns:

the path’s stroke color.

Return type:

Clutter.Color

Gets the path’s stroke color.

New in version 0.10.

get_stroke_width()
Returns:

the width of the stroke

Return type:

float

Gets the width of the stroke.

New in version 0.10.

get_visible()
Returns:

True when the path is visible, False otherwise

Return type:

bool

Gets path visibility.

New in version 0.10.

insert_node(location, position)
Parameters:

Inserts a Champlain.Location object to the specified position.

New in version 0.10.

remove_all()

Removes all Champlain.Location objects from the layer.

New in version 0.10.

remove_node(location)
Parameters:

location (Champlain.Location) – a Champlain.Location

Removes the Champlain.Location object from the layer.

New in version 0.10.

set_closed(value)
Parameters:

value (bool) – True to make the path closed

Makes the path closed.

New in version 0.10.

set_dash(dash_pattern)
Parameters:

dash_pattern ([int]) – list of integer values representing lengths of dashes/spaces (see cairo documentation of cairo.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.

New in version 0.12.4.

set_fill(value)
Parameters:

value (bool) – if the path is filled

Sets the path to be filled

New in version 0.10.

set_fill_color(color)
Parameters:

color (Clutter.Color or None) – The path’s fill color or None to reset to the default color. The color parameter is copied.

Set the path’s fill color.

New in version 0.10.

set_stroke(value)
Parameters:

value (bool) – if the path is stroked

Sets the path to be stroked

New in version 0.10.

set_stroke_color(color)
Parameters:

color (Clutter.Color or None) – The path’s stroke color or None to reset to the default color. The color parameter is copied.

Set the path’s stroke color.

New in version 0.10.

set_stroke_width(value)
Parameters:

value (float) – the width of the stroke (in pixels)

Sets the width of the stroke

New in version 0.10.

set_visible(value)
Parameters:

value (bool) – True to make the path visible

Sets path visibility.

New in version 0.10.

Property Details

Champlain.PathLayer.props.closed
Name:

closed

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

The shape is a closed path

New in version 0.10.

Champlain.PathLayer.props.fill
Name:

fill

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

The shape should be filled

New in version 0.10.

Champlain.PathLayer.props.fill_color
Name:

fill-color

Type:

Clutter.Color

Default Value:

<Color structure at 0x000000000000 (ClutterColor at 0x0000000)>

Flags:

READABLE, WRITABLE

The path’s fill color

New in version 0.10.

Champlain.PathLayer.props.stroke
Name:

stroke

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

The shape should be stroked

New in version 0.10.

Champlain.PathLayer.props.stroke_color
Name:

stroke-color

Type:

Clutter.Color

Default Value:

<Color structure at 0x000000000000 (ClutterColor at 0x0000000)>

Flags:

READABLE, WRITABLE

The path’s stroke color

New in version 0.10.

Champlain.PathLayer.props.stroke_width
Name:

stroke-width

Type:

float

Default Value:

2.0

Flags:

READABLE, WRITABLE

The path’s stroke width (in pixels)

New in version 0.10.