7 text
.preamble(r
"\renewcommand{\familydefault}{\ttdefault}")
10 # positioning is quite ugly ... but it works at the moment
17 def drawstyle(name
, showpath
=0, default
=0):
19 p
= path
.path(path
.moveto(x
+ 0.1, y
+0.1 ),
20 path
.rlineto(length
/2.0, 0.3),
21 path
.rlineto(length
/2.0, -0.3))
22 c
.stroke(p
, [style
.linewidth
.THIck
, eval("style."+name
)])
24 c
.stroke(p
, [style
.linewidth
.Thin
, color
.gray
.white
])
26 name
= name
+ r
"\rm\quad (default)"
27 c
.text(x
+ 1.5, y
+ 0.15, name
, [text
.size
.footnotesize
])
34 drawstyle("linecap.butt", showpath
=1, default
=1)
35 drawstyle("linecap.round", showpath
=1)
36 drawstyle("linecap.square", showpath
=1)
40 drawstyle("linejoin.miter", showpath
=1, default
=1)
41 drawstyle("linejoin.round", showpath
=1)
42 drawstyle("linejoin.bevel", showpath
=1)
46 drawstyle("linestyle.solid", default
=1)
47 drawstyle("linestyle.dashed")
48 drawstyle("linestyle.dotted")
49 drawstyle("linestyle.dashdotted")
53 drawstyle("linewidth.THIN")
54 drawstyle("linewidth.THIn")
55 drawstyle("linewidth.THin")
56 drawstyle("linewidth.Thin")
57 drawstyle("linewidth.thin")
58 drawstyle("linewidth.normal", default
=1)
59 drawstyle("linewidth.thick")
60 drawstyle("linewidth.Thick")
61 drawstyle("linewidth.THick")
62 drawstyle("linewidth.THIck")
63 drawstyle("linewidth.THICk")
64 drawstyle("linewidth.THICK")
66 drawstyle("miterlimit.lessthan180deg", showpath
=1)
67 drawstyle("miterlimit.lessthan90deg", showpath
=1)
68 drawstyle("miterlimit.lessthan60deg", showpath
=1)
69 drawstyle("miterlimit.lessthan45deg", showpath
=1)
70 drawstyle("miterlimit.lessthan11deg", showpath
=1, default
=1)
74 drawstyle("dash((1, 1, 2, 2, 3, 3), 0)")
75 drawstyle("dash((1, 1, 2, 2, 3, 3), 1)")
76 drawstyle("dash((1, 2, 3), 2)")
77 drawstyle("dash((1, 2, 3), 3)")
78 drawstyle("dash((1, 2, 3), 4)")
79 drawstyle("dash((1, 2, 3), rellengths=1)")
82 c
.writeEPSfile("pathstyles")
83 c
.writePDFfile("pathstyles")