Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 9b3ef98d82282343cfac7f840aa5ab34 > files > 305

PyX-0.11.1-1.fc15.i686.rpm

Clipping a canvas

This example shows how drawing on a canvas can be clipped to a predefined
region. The thick line is drawn two times, first in black onto an ordinary
canvas, the second time in red onto a canvas which is clipped to the indicated
circle. ...

The clipping property of a canvas must be specified on creation with an
instance of `canvas.clip`, which takes a path as an argument. Note that this
way of clipping will probably be removed in future releases of PyX. Instead, it
will become part of the [box concept ../../roadmap.html].