On Mon, 29 Nov 2004, Joerg Lehmann wrote:
> [ snip traceback when using translateablecanvas]
> > Presumably I am missing something simple here
> > (or translateablecanvas.py is not fully adapted for 0.7 yet ;-(...)
> Oh yes, it also did not survive the stylegeddon. But the following insertstyle
> works for me:
> class insertstyle(graph.style.symbol):
> """a graph style, which calls a translate_pt method of the symbol to insert
> the result, instead of calling the symbol to get a path to be drawn"""
> def drawpoint(self, privatedata, sharedata, graph):
> if sharedata.vposvalid and privatedata.symbolattrs is not None:
> xpos, ypos = graph.vpos_pt(*sharedata.vpos)
> privatedata.symbolcanvas.insert(privatedata.symbol.translate_pt(xpos, ypos))
Great - this works without problems!
(I would not have been able to figure that out myself ;-).