File: smoothed.py

package info (click to toggle)
pyx3 0.14.1-5
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 8,928 kB
  • ctags: 3,516
  • sloc: python: 21,171; ansic: 127; makefile: 87; sh: 8
file content (11 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
from pyx import *

c = canvas.canvas()
p = path.line(0, 0, 2, 2)
p.append(path.curveto(2, 0, 3, 0, 4, 0))
c.stroke(p)
c.stroke(p, [deformer.smoothed(1.0), color.rgb.blue])
c.stroke(p, [deformer.smoothed(2.0), color.rgb.red])
c.writeEPSfile("smoothed")
c.writePDFfile("smoothed")
c.writeSVGfile("smoothed")