paperjs/paper.js — pull request #56 by obeattie (2011-10-23 11:07:22+00:00)
Title: Clipped groups to support clipping of any object

Changed implementation of clipped groups to support masking from any object

As `CanvasNode.clip()` does not seem to support clipping to anything other than a path, changed the implementation to instead render to an in-memory canvas, and use `globalCompositeOperation` to achieve the desired effect.

As discussed [on the mailing list](https://groups.google.com/d/topic/paperjs/kKApCRXdDkk/discussion), this allows a shape to be clipped within text for example.