[Cairo] Stroking problem

Soorya Kuloor skuloor at verano.com
Fri Jul 25 11:33:47 PDT 2003

Hi Carl,

I just upgraded to Cairo from Xr, so that I can implement
cairo_surface_set_clip_region() function. However, in the process I have
found a bug. I am attaching a test program that reproduces the bug.

The test tries to draw a rectangle and then rotates it by approx. 90
degrees (note: not exactly 90 degrees, but pretty close). On my machine
it takes 5.8 secs to stroke this one rectangle. If I change the
transformation to exact 90 degrees the rectangle draws in less than a
millisecond as expected. I did a runtime profile and found that function
_line_segs_intersect_ceil() in file cairo_traps.c goes into an almost
infinite loop at the while loop at line 416. Unfortunately, I do not
understand the math in there. The problem does not happen if I fill the
rectangle, instead of stroking it.

Can you please help?

-- Soorya

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairorect.c
Type: text/x-c
Size: 6097 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20030725/9776d427/cairorect.bin

More information about the cairo mailing list