Package: cairo

Function cairo-clip

Lambda List

cairo-clip (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.

After a call of the cairo-clip function, the current path will be cleared from 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 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 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