|
From: Michael J G. <mic...@fa...> - 2006-03-16 15:55:29
|
Hi again, I'm kinda getting to like the deco concept... I remembered an old post by Andre, showing a method (due to J=F6rg, I think) for laying out text along a curve. I adjusted it to the current API and coded it as a decorator dubbed deco.curvedtext(). I'm attaching a simple example (how to achieve typical line ups) and the code. The code goes into deco.py (current svn). I'm unsure about the following: a) Is the patch to dvifile.dvifile.putchar appropriate for going into the trunk, or are there side effects (I don't know that module)? b) Is it appropriate to attach eps examples here? c) What's the best format for code suggestions? I'd be happy to send diffs, but the patch mentioned above made it somehow inconvenient here (the "local" patch I'm applying won't be the final form, of course). As for the other text decorators (text as it is or (t)text as suggested by me recently or text rotated parallel to the curve [tangential labels]): I imagine a universal decorator deco.insert() would be best which inserts a given canvas at certain points of the path, with or without a user specified alignment, with or without rotation with respect to the absolute co system or the local path tangent. Then, all text decorators (except for deco.curvedtext) would be simple calls to deco.insert(text.text(...)). But one could also easily decorate with symbols "moving" along the path and such. Please tell me what you think, or else I might start hacking away ;) Cheers, Michael |