[cairo] cairo_rectangle and clipping -- doesn't work?
cworth at cworth.org
Mon Jun 13 08:46:49 PDT 2005
On Mon, 13 Jun 2005 16:15:08 +0100, "Gustavo J. A. M. Carneiro" wrote:
> I have discovered that cairo_rectangle() followed by cairo_clip()
> doesn't seem to work for clipping to a rectangle. I had to manually
> construct a rectangle using move_to and a bunch of line_to's. This is a
> bit unexpected. Is it a known limitation, or a bug?
That would be a bug, and something I've never seen before. Various
tests in the test suite use cairo_rectangle(); cairo_clip();
Can you provide a minimal test case that demonstrates the bug?
The other things that makes this behavior quite surprising is that the
implementation of cairo_rectangle is nothing more than a move_to and a
bunch of line_to's. Specifically:
cairo_move_to (cr, x, y);
cairo_rel_line_to (cr, width, 0);
cairo_rel_line_to (cr, 0, height);
cairo_rel_line_to (cr, -width, 0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050613/8191cb8d/attachment.pgp
More information about the cairo