11 "coordinates as strings"
17 p
.append(lineto("%d pt" % i
, "%d pt" % i
))
20 c
.writeEPSfile("testspeed")
23 "coordinates in user units"
32 c
.writeEPSfile("testspeed")
35 "coordinates in pts (internal routines)"
38 p
=path(pyx
.path
.moveto_pt(0,0))
41 p
.append(pyx
.path
.lineto_pt(i
, i
))
44 c
.writeEPSfile("testspeed")
46 def testspeedintersect():
47 p
=path(moveto(10,10), curveto(12,16,14,15,12,19))
50 for x
in range(1,100):
51 q
=path(moveto(x
/5.0,10), curveto(12,16,14,22,11,16))
53 isect
= bp
.intersect(bq
, epsilon
=1e-3)
55 import profile
, pstats
57 import hotshot
, hotshot
.stats
59 def profilefunction(f
):
60 prof
= hotshot
.Profile("test.prof")
63 stats
= hotshot
.stats
.load("test.prof")
65 stats
.sort_stats('time', 'calls')
68 profile
.run('testspeed()', 'test.prof')
69 pstats
.Stats("test.prof").sort_stats('time').print_stats(10)
71 profilefunction(testspeed
)
73 #profile.run('testspeed2()', 'test.prof')
74 #pstats.Stats("test.prof").sort_stats('time').print_stats(10)
76 #profile.run('testspeed3()', 'test.prof')
77 #pstats.Stats("test.prof").sort_stats('time').print_stats(10)
79 #profile.run('testspeedintersect()', 'test.prof')
80 #pstats.Stats("test.prof").sort_stats('time').print_stats(10)