[cairo] clipping question

Fabien Costantini fab672000 at yahoo.fr
Tue Jun 27 08:25:15 PDT 2006


Hi,
I would like to push and pop clipping rectangular surfaces in a given context.

For the rectangle clip accumulation,
I suppose I must use 
cairo_clip(), then cairo_clip_preserve() 

But then If i want to remove the latest rectangle i accumulated 
with  cairo_clip_preserve() what am i supposed to do ?
If I use cairo_reset_clip() I remove all clipping.

Is there an api permitting to keep track of clipping states 
so that I could restore my previous state to implement the pop_clip functionnality ?

Otherwise, I could achieve this functionnality by first calling cairo_reset_clip() 
then 'replay' all clips surfaces but I'm afraid it will be time consuming.

TIA,
Fabien.






More information about the cairo mailing list