From: Armin S. <li...@ar...> - 2005-09-21 09:51:35
|
Hi, when writing the point() function for SimplyDraw, I reused functions like pyx.graph.style._circlesymbol from the graph styles. I'm not really satisfied with my type=dot parameter, because I think it would be more PyX like to handle the type via an attr perhaps named symbol. To fix ideas I therefore wrote this symbol attribute (I have attached the file where it is defined). Using this for a new implementation of canvas.point() one would be able to do e.g. point(x, y) point(x, y, symbol.cross) point(x, y, symbol.dot([rbg.red])) point(x, y, symbol.plus(size=.3)). I have never written an attribute class before, so I might have mixed some things. Nevertheless I hope that the new point() function behaves more PyXic ;) Now I wonder if such an attribute could have more usage as just in the point() function. One idea could be a path decorator that places symbols at the edges of a path. Unfortunately I didn't see an easy way for getting the vertices of a path as the points supplied e.g. to lineto seem not to get stored for retrieval. Cheers -- Armin Straub |