cairo_clip_extents returns all 0s after a cairo_clip call

Christian Kellermann <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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

--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.