Pierre Hjälm <pierre.hjalm@dis.uu.se> writes:
And just to be practical, Brian's questions:
Thanks, I then guess that there has not been made a comprehesive test
of everything?
I have been doing some simple stuff to get started and I have found
the following bugs and solved some of the problems. Several questions
have arised:
Fixed Bugs(?):
*Rectangle attachment points are wrong. Change lines 1524-- in
_basic.py to
if physicalAttachment == 0:
pt=left,(top+bottom)/2.0 #BE pt = self.CalcSimpleAttachment((left, bottom), (right, bottom), nth, no_arcs, line)
elif physicalAttachment == 1:
pt=((left+right)/2.0,top) #BE pt = self.CalcSimpleAttachment((right, bottom), (right, top), nth, no_arcs, line)
elif physicalAttachment == 2:
pt=(right,(top+bottom)/2.0) #BE pt = self.CalcSimpleAttachment((left, top), (right, top), nth, no_arcs, line)
elif physicalAttachment == 3:
pt=((left+right)/2.0,bottom) #BE pt = self.CalcSimpleAttachment((left, bottom), (left, top), nth, no_arcs, line)
*Polygon region is not centred:
change line 1204 in _basic.py to:
new_line = ShapeTextLine(self._xpos, self._ypos, string) #BE new_line = ShapeTextLine(0, 0, string)
add line 2426 to _basic.py
self.CalculatePolygonCentre() #BE Added to have centered text - may give other problems?
*Polygon attachments are wrong: Change line 2693 in _basic.py to
point = self._points[attachment]#BE point = self._points[0]
*Lines with more than 2 control points had all intermediate points
initiliazed in the middle. Change lines 338 in _lines.py to
number_of_points=len(self._lineControlPoints)#BE
for i in range(1,number_of_points):#for i in range(1,len(self._lineControlPoints)):
and line 353 to
self._lineControlPoints[i] = wx.RealPoint((x2 - x1) / float(number_of_points-1)*i + x1, (y2 - y1) / float(number_of_points-1)*i + y1) #BE self._lineControlPoints[i] = wx.RealPoint((x2 - x1) / 2.0 + x1, (y2 - y1) / 2.0 + y1)
Bugs(?) not fixed:
* the attachment modes defined in _oglmisc.py don't seem to be
available
* draw_handles doesn't give the effect I expected, show all control points
Questions unsolved:
*I still would like to know how to extract all information about the
current diagram.
*Are other line styles available, such as dashed, double, fat lines? What
about making lines consisting of different line types, i.e., solid and
dashed parallel to each other?
*Can lines be kept either vertical or horizontal and so that lines
with more control points can only turn 90 degrees?
*How can line control points be dragged?
tia,
···
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html