Name
ccontext:ClipPreserve -- set new clip region and preserve path
Synopsis
ccontext:ClipPreserve()
Function
Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by ccontext:Fill() and according to the current fill rule (see ccontext:SetFillRule()).

Unlike ccontext:Clip(), ccontext:ClipPreserve() preserves the path within the Cairo context.

The current clip region affects all drawing operations by effectively masking out any changes to the surface that are outside the current clip region.

Calling ccontext:ClipPreserve() can only make the clip region smaller, never larger. But the current clip is part of the graphics state, so a temporary restriction of the clip region can be achieved by calling ccontext:ClipPreserve() within a ccontext:Save() / ccontext:Restore() pair. The only other means of increasing the size of the clip region is ccontext:ResetClip().

Inputs
none


Show TOC