Vitor Bosshard wrote:
It's attached. I managed to keep it at ~100 lines.
I've take a look. It seems to work fine for me on OS-X, anyway.
A few comments, though:
def UpdateCircles(self, coord):
self.RemoveObjects(self.circles)
self.circles = []
for i in range(25):
self.circles.append(self.AddCircle((coord[0]+i%5*5,coord[1]+i),
Diameter=10,
LineColor="White"))
DrawObjects have a Move() method, so that you can move them without
removing them and re-creating them. There is also a SetPoint method, if
you want to set their center points to a specific value:
for i, circle in enumerate(self.Circles):
circle.SetPoint((coord[0]+i%5*5,coord[1]+i))
You also might want to put all the Circles in a Group object, but then
you have to use Move(), rather than SetPoint.
I've enclosed an edited version. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected]
canvas_sample.py
Description: application/python
_______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
