Package: cairo

Function cairo-clip-preserve

Lambda List

cairo-clip-preserve (cr)

Arguments

cr -- a cairo-t context

Details

Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by the cairo-fill function and according to the current fill rule. See the cairo-set-fill-rule function.

Unlike the cairo-clip function, the cairo-clip-preserve function 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 the cairo-clip-preserve function 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 the cairo-clip-preserve function within a cairo-save/cairo-restore pair. The only other means of increasing the size of the clip region is the cairo-reset-clip function.
 

See also

2021-12-12