|
From: Gert I. <Ger...@Ph...> - 2003-04-26 12:34:27
|
Hi André,
the other day, we had a private email discussion about changing defaults.
After the discussion, you mentioned that it might have been better to
discuss this on the list so that other people could profit from it. I just
came across another example which I find quite counterintuitive and which
you might use to explain to the general public (and to me) the reason why
PyX behaves the way it does. Here comes the minimal example:
--------------------------------------------
from pyx import *
textattr = text.halign.center, text.size.large
# textattr = text.halign.center, text.valign.baseline, text.size.large
c = canvas.canvas()
c.stroke(path.line(0,0,2,0))
c.text(1,0, "egg", *textattr)
c.writetofile("example")
--------------------------------------------
This example works fine. However commenting out the first line defining
the text attributes and uncommenting the second one yields the string
"None" instead of "egg" although text.valign.baseline is the default.
One would therefore expect that nothing changes...
If you have some spare time, you might explain the philosophy behind this
behavior.
Best regards,
Gert
--
Gert-Ludwig Ingold |
Institut fuer Physik | email: In...@Ph...
Universitaet Augsburg | Phone: +49-821-598-3234
D-86135 Augsburg | Fax : +49-821-598-3222
Germany |
WWW homepage: http://www.physik.uni-augsburg.de/theo1/ingold
|