From: Andre W. <wo...@us...> - 2005-03-24 14:11:35
|
Hi, On 21.03.05, Magnus Lie Hetland wrote: > This may be totally redundant, but... It is kind of redundant for me (and Jörg as I we talked by phone yesterday), but it might be helpful for other people. > I've been using MetaPost and PyX for several things, but not often > enough, I think. I keep forgetting the details of the API, and > sometimes (although not often, luckily ;) just end up coding things > directly in PostScript, for example. (On a few occasions I've written > a thing Python-wrapper on top of PostScript as well.) Utter simplicity > was one of my/our original intentions behind Piddle as well, but that > never really went anywhere. > > A while ago I came across Just van Rossum's DrawBot, which seemed > rather nice. I didn't look into it too much, but just now I came > across this fork/spinoff: > > http://nodebox.net > > It's basically a really-really-simple drawing API, meant for designers > and the like. For simple drawings (which I need every now and then) it > seems quite nice -- except, of course, that it doesn't support TeX ;) > > I was thinking about writing a little module for this sort of simple > drawing API with PyX as a back-end; and I just wondered -- would it be > interesting to have this sort of module in the PyX distribution? It > could be a starting point for newbies, perhaps? Right. And the funny storry is, that in much earlier version of PyX (far before our first releases), we started along a line much like this. This is also due to the fact, that we used to work with GLE (see gle.sf.net) before we started PyX. And this was kind of similar. Basically there are some global variables ... a global canvas ... etc. In the end we dropped it out of PyX (except for the unit system, which uses some global variables, since otherwise you would need to pass your unit configuration around all the time; and the global default texrunner instance -- both issues are convenience decisions, since our library should be easy to use for the end "programmer"). But this does not mean at all, that one could not introduce such a object-less version and make it feel more or less like nodebox. Its even not that much work (depending on the level of equality you want to reach with nodebox). > On the other hand, the differences between this sort of API and the > PyX API aren't all that great, so it might just lead to confusion -- I > don't know. I just thought I'd share my musings... Well, I think such an extension could be contained in the contrib directory. It is certainly nothing to take into the core of PyX, but it would be a nice add-on. So, sure, you're welcome to strip most of the object-oriented features of PyX in favour of some global variabels and make the whole thing to behave like nodebox. Such a contribution could well be included into PyX in case you (or others) want to contribute ... André -- by _ _ _ Dr. André Wobst / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ |