ADC Home > Reference Library > Technical Q&As > Graphics & Imaging > Quartz >

Turning Off Core Graphics Clipping

Q: I've used CGContextClip, CGContextEOClip, CGContextClipToRect, or CGContextClipToRects to modify the clipping path for the current context. However, all of these functions intersect the current clipping path with the new path. How do I reset or turn off the clipping path?

A: In order to clear the clipping path, you must save the graphics state for the context using CGContextSaveGState before you alter the clipping path. You can then reset the clipping path to its original state by calling CGContextRestoreGState.

[Jul 02 2001]

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.