Re: dashline migration from 0.14 to 2.0
- From: Damon Chaplin <damon karuna eclipse co uk>
- To: Serge Noiraud <Serge Noiraud free fr>
- Cc: goocanvas-list gnome org
- Subject: Re: dashline migration from 0.14 to 2.0
- Date: Tue, 02 Jul 2013 09:30:35 +0100
On Mon, 2013-07-01 at 20:54 +0200, Serge Noiraud wrote:
Hi,
I have a porting problem with dash lines.
With goocanvas 0.14
the python program used :
item = goocanvas.Path(parent = self.current_parent(),
data = p_data,
stroke_color = stroke_color,
line_width = 1,
line_dash = goocanvas.LineDash([5.0, 5.0]))
Someone port it to :
item = GooCanvas.CanvasPath(parent = self.current_parent(),
data = p_data,
stroke_color = stroke_color,
line_width = 1,
line_dash = GooCanvas.LineDash([5.0, 5.0]))
It crashed because GooCanvas.LineDash accept no argument.
What is the best way to have the same functionality ?
I think the same problem occurred with GooCanvas.CanvasPoints.
Apparently boxed types do not allow arguments to constructors with
introspection. So the __new__ function was overridden. See
bindings/python/GooCanvas.py.
Maybe you can do the same thing for LineDash.
A long-term solution I guess would be to add a function like
goo_canvas_line_dash_set_dashes() to set the dash data after it has been
created. (We also need a set_dash_offset().)
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]