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: Thu, 04 Jul 2013 08:48:47 +0100
On Wed, 2013-07-03 at 22:16 +0200, Serge Noiraud wrote:
Le 02/07/2013 10:30, Damon Chaplin a écrit :
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
Too complicated for me as I don't understand what is done. Is there a easier method ?
I don't know. Maybe someone who knows about python and introspection
could help.
I think it's a bug do I need to report it ?
I've added it:
https://bugzilla.gnome.org/show_bug.cgi?id=703592
Damon
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]