[cairo] cairo dash line bug? an unexpected polygon was rendered when drawing the dash line rectangle
M Joonas Pihlaja
jpihlaja at cc.helsinki.fi
Wed Jun 24 17:35:04 PDT 2009
On Wed, 24 Jun 2009, Lonely Hiker wrote:
> Hi All,
> I am new to Cairo and today i encounter a dash line problem on Win32.
> I had some testing code for it:
[snip TestBug() function]
I ran this function on a cairo_image_surface() of size 1300x600 using
cairo-1.6.4 and cairo-1.8.8 on Linux but couldn't replicate the bug
Both times the result was a nice green dashed rectangle. What version
of cairo are you using? If your cairo is older than 1.8.8 would you
mind trying with the latest stable release?
> I ran the test application and tried to resize the window slowly so
> that the retangle can be cut-off. During the resizing, at some
> position the rendering showed this bug: it filled a huge polygon
> with the color that was set for the stroke and covered part of the
> rectangle. You can see this in the attachment.
Yikes. Looks bad. :|
> I guess this is a cairo dash line bug? Any idea is appreciated.
> Here is the test application:
[snip windows app]
Unfortunately I can't run this app as I'm not near a windows box. I
scanned through the win32 surface implementation and it looks like it
relies on the generic cairo stroker, so the result ought to be
identical using an image surface and a win32 surface -- in theory.
Could you check if the bug appears using the following program?
cairo_surface_t *im = cairo_image_surface_create(
cairo_t *cr = cairo_create(im);
More information about the cairo