To: discussions about usage and development of dia <dia-list gnome org>
Subject: Re: Length of a PolyLine
Date: Wed, 26 Jan 2005 17:52:06 +0100
Hi Hans,
Hans Breuer wrote:
Shouldn't the parameters to pow() be the other way around?
Your right.
What do you mean with "not always the same"? Looking just at the
Python bindings plug-ins/python/pydia-property.c(PyDia_get_PointArray)
you'll get the points in the same order as stored internally. And
that needs to be ordered to get the drawing right.
I draw a simple PolyLine with two points and they seem to be a little
bit double-minded where to be :-)
#!/usr/bin/env python
points =
dia.active_display().diagram.layers[0].objects[2].properties['poly_points']
for i in range(len(points.value)):
print points.value[i]