[cairo] cairo_clip_extents returns all 0s after a cairo_clip call
Christian Kellermann
ckeen at pestilenz.org
Fri Mar 9 04:21:47 PST 2012
Hi!
I want to check the size of the current clipping region to adjust
scaling of composed surfaces before masking them in.
So I am currently doing the following:
double x1, y1, x2, y2;
cairo_rectangle( cr, 100, 100, 100, 100);
cairo_stroke(cr);
cairo_rectangle(cr, 100, 100, 20, 20);
cairo_clip(cr);
cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
This returns all x1,... to be 0.0.
Now If I call cairo_clip_extents before the call to cairo_clip, I am
seeing the current screen size, as I would have expected.
I am probably doing it wrong(tm). What's the right way to do this?
This is with cairo 1.10.2 as packaged with ubuntu.
Thanks!
Christian
More information about the cairo
mailing list