repo.or.cz
/
PyX
/
mjg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
added mathtree bug
[PyX/mjg.git]
/
manual
/
tex1.py
blob
27c394166037ada0891daf9c2677792a76afc90d
1
#!/usr/bin/env python
2
import
sys
3
sys
.
path
[:
0
] = [
".."
]
4
from
pyx
import
*
5
6
7
c
=
canvas
.
canvas
()
8
t
=
c
.
insert
(
tex
.
tex
())
9
t
.
text
(
0
,
0
,
"Hello, world!"
)
10
print
"width:"
,
t
.
textwd
(
"Hello, world!"
)
11
print
"height:"
,
t
.
textht
(
"Hello, world!"
)
12
print
"depth:"
,
t
.
textdp
(
"Hello, world!"
)
13
c
.
writetofile
(
"tex1"
)
14