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

« back to all changes in this revision

Viewing changes to examples/drawing2/clipping.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
clippath = path.circle(0, 0, 1)
 
4
drawpath = path.line(-2, -2, 1.2, 2)
 
5
 
 
6
cl = canvas.canvas([canvas.clip(clippath)])
 
7
cl.stroke(drawpath, [color.rgb.red, style.linewidth(1.0)])
 
8
 
 
9
c = canvas.canvas()
 
10
c.stroke(drawpath, [style.linewidth(1.0)])
 
11
c.insert(cl)
 
12
c.stroke(clippath)
 
13
 
 
14
c.writeEPSfile("clipping")
 
15
c.writePDFfile("clipping")