Skip to content


Support clipping masks #286

systemed opened this Issue · 2 comments

3 participants


It would be nice to support clipping masks so that a complex drawing can be kept within certain bounds.

One way to do this is:

q     # save the current graphics state
<x> <y> <width> <height> re   # rectangle
W     # modify clipping path
n     # no-op - "don't paint the path"

The graphics state containing the original clipping mask can be retrieved later with a Q operator as per usual.

@practicingruby practicingruby removed the stale label
prawnpdf member

I don't think we have support for this now, but a patch would be welcome. Sorry we never responded to this request.


Adding myself to the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.