[cairo] cairo dash line bug? an unexpected polygon was rendered when drawing the dash line rectangle

lonely_hiker09 at yahoo.com lonely_hiker09 at yahoo.com
Thu Jun 25 17:18:11 PDT 2009


Hi Joonas,
 
Today I tested 1.8.8 and it worked find. After I tested 1.6.4 and  1.8.6 of cairo in our project I found that it wasn't a cairo bug. It should be caused by some cairo changes that were made by ourself. Sorry for this bug report. And thank you very much for your help~~~
 
Nick

--- On Thu, 6/25/09, M Joonas Pihlaja <jpihlaja at cc.helsinki.fi> wrote:


From: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Subject: Re: [cairo] cairo dash line bug? an unexpected polygon was rendered when drawing the dash line rectangle
To: "Lonely Hiker" <lonely_hiker09 at yahoo.com>
Cc: cairo at cairographics.org
Date: Thursday, June 25, 2009, 12:35 AM



Hi,

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?

int
main()
{
        cairo_surface_t *im = cairo_image_surface_create(
                CAIRO_FORMAT_ARGB32,
                1300, 600);
        cairo_t *cr = cairo_create(im);

        cairo_set_source_rgb(cr, 1,1,1);
        cairo_paint(cr);

        TestBug(cr);

        cairo_surface_write_to_png(im, "out-dash-bug.png");
        cairo_surface_destroy(im);
        cairo_destroy(cr);
        return 0;
}

Cheers,

Joonas



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20090625/cdc01484/attachment.html 


More information about the cairo mailing list