On Wed, Sep 12, 2007 at 01:11:54PM -0500, John Hunter wrote: > Then the front end (eg Line2D) could do something like
> def on_renderer_change(self, renderer): > # on renderer change; path data already has the > # separable/nonlinear part handled > self.pathid = renderer.push_path(pathdata) > Additionally, you would need to track when either the data or > nonlinear mapping function are changed in order to remove the old > path and push out a new one. Then at draw time, you would not need > to push any data to the backend > def on_draw(self, renderer): > # on draw the line just needs to inform the backend to draw the > # cached path with the current separable transformation > renderer.draw_path(self.pathid, gc, septrans) I am a bit tired, and I haven't been following the discussion too closely, but I have the feeling this is the kind of pattern that Traits makes both obvious and optimizes a lot. If you give me a concrete minimal example I would be able to say more, and maybe try to see how it flows in Traits. I guess I am just trying to sell Traits, but it seems to me it solves the problem very well, and has been well optimized (quicker than vanilla Python for these kind of things). If you are interested checking this line out, posting a minimal example of what you are trying to achieve on the enthought-dev mailing-list would get you higher quality answers. Gaƫl ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel