[cairo] How can I fin out out the current clip region of cairo

M Joonas Pihlaja jpihlaja at cc.helsinki.fi
Thu Feb 25 14:34:06 PST 2010


On Fri, 26 Feb 2010, M Joonas Pihlaja wrote:

> An alternative way to debug the clip might be to paint with solid 
> white to a temporary surface something like this and seeing where the 
> paint lands:

[snip]

> cairo_push_group (cr);
>   cairo_set_source_rgb (cr, 1, 1, 1);
>   cairo_paint (cr);
> clip_pattern = cairo_pop_target (cr);

Firstly, it's pop_group() and not pop_target(), and secondly it looks 
like using push_group()/pop_group() like this might be a bad idea.  
I'm seeing rather weird results when I actually tested it.  It should 
work fine without the extra group however.  Sorry about the confusion.

Cheers,

Joonas


More information about the cairo mailing list