[reportlab-users] Status of clipping paths?

Dinu Gherman gherman at darwin.in-berlin.de
Tue Oct 29 08:23:39 EDT 2013

Robin Becker:

> "There is no way to enlarge the current clipping path or to set a new clipping path without reference to the current one. However, since the clipping path is part of the graphics state, its effect can be localized to specific graphics objects by enclosing the modification of the clipping path and the painting of those objects between a pair of q and Q operators (see Section 4.3.1, “Graphics State Stack”). Execution of the Q operator causes the clipping path to revert to the value that was saved by the q operator before the clipping path was modified."


> I think we abandoned the idea of trying to reset a clipping path in PDF. It could be done by placing an outer save state around each page. The reset operation would then need to restore the graphics state and immediately start a new save state with everything copied across from the old state except the clipping path; I think that would be quite hard.

Thanks for the info, Robin! I'm in a hurry now and can't investigate that much more deeply, but quickly found these two links speaking of a clipping path operator W, I was not aware of, before:


In some sense I would be very surprised if this kind of thing should be made so difficult by Adobe, especially given that all this should have worked in PostScript, already, which is a pretty save assumption to make.



More information about the reportlab-users mailing list