PyX — Gallery: misc/pyxpyx.py

0.4 KB
118.2 KB
29.4 KB

pyxpyx

pyxpyx.png
from pyx import *

textpath = text.text(0, 0, r"\PyX").textpath().reversed()
decotext = r"\PyX{} is fun! "*50
scale = text.text(0, 0, decotext).width/textpath.arclen()

c = canvas.canvas()
c.draw(textpath, [trafo.scale(scale),
                  deco.filled([color.gray(0.5)]),
                  deco.curvedtext(decotext)])
c.writeEPSfile("pyxpyx")
c.writePDFfile("pyxpyx")