~ubuntu-branches/ubuntu/trusty/pyx/trusty

« back to all changes in this revision

Viewing changes to examples/path/split.py

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2006-11-26 14:04:53 UTC
  • mfrom: (2.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20061126140453-1dq3cycpspmlik2t
Tags: 0.9-3
* New maintainer. Thank you for more than three years of
  maintenance,  Graham! Closes: #400087
* Don't hard-code python 2.3 in manual/Makefile.
  Thanks to Matthias Klose for the bug report and patch.
  Closes: #392634
* Remove obsolete dh_python call from debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from pyx import *
 
2
 
 
3
p = path.curve(0, 0, 1, 0, 1, 1, 2, 1)
 
4
p1, p2, p3 = p.split([0.5, p.end()-0.5])
 
5
 
 
6
c = canvas.canvas()
 
7
c.stroke(p, [style.linewidth.Thin, color.rgb.red])
 
8
c.stroke(p2, [style.linewidth.Thick, color.rgb.green])
 
9
c.writeEPSfile("split")
 
10
c.writePDFfile("split")