add UnicodeEngine (MultiEngineText and axis texters returning MultiEngineText), texte...
[PyX.git] / examples / text / color.py
blobf7ed0f8b95d6c6a42e4afca2e283b5be5d4bccd2
1 from pyx import *
2 unit.set(uscale=2, xscale=2)
4 col = color.cmyk.PineGreen
6 text.set(text.LatexRunner)
7 text.preamble(r"\usepackage{color}")
8 text.preamble(r"\definecolor{COL}{cmyk}{%g,%g,%g,%g}" % (col.c, col.m, col.y, col.k))
10 c = canvas.canvas()
11 c.text(0, 0, r"\textcolor{COL}{Text} and outline have the same color")
12 c.stroke(path.rect(-0.2, -0.2, 6.2, 0.6), [col])
13 c.writeEPSfile("color")
14 c.writePDFfile("color")
15 c.writeSVGfile("color")