strange bug(?) in cairo2 1.12.16-0ubuntu2

Patrik Nilsson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi All,

I'm rendering to an A1 surface. First I fill the surface (with
cairo_fill_preserv) and then make a frame (cairo_stroke). It is later
going to be used as a mask.

The stroke is always drawn regardless of the shape, but cairo_fill (or
cairo_fill_preserv) only fills the surface if it is non-rectangular.

This doesn't work in package "cairo2 1.12.16-0ubuntu2", but it worked in
previous versions of cairo. The package in Debian 7 works cairo_fill. 
Is there a bug introduced?

    //Points to be drawn is in a list called areascreen.

    //These lines are just for a workaround if the shape is rectangular
    GdkPoint *first = areascreen.GetHead ();
    if ( first != NULL )
    {
        GdkPoint point;
        memcpy ( &point, first, sizeof ( GdkPoint ) );
        point.x ++; //some strange bug in cairo
        point.y ++; //some strange bug in cairo

        areascreen.AddTail ( &point );
    }

    /////

    cairo_set_operator ( cr, op );

    /////

    cairo_new_path ( cr );

    GdkPoint *p = areascreen.GetHead ();
    while ( p != 0 )
    {
        if ( p == areascreen.GetHead () )
        {
            cairo_move_to ( cr, p->x, p->y );
        }
        else
        {
            cairo_line_to ( cr, p->x, p->y );
        }

        p = areascreen.GetNext ( p );
    }

    cairo_close_path ( cr );

    cairo_set_source_rgba ( cr, rfill, gfill, bfill, afill );
    cairo_fill_preserve ( cr );

    ////

    cairo_set_line_width ( cr, 1 );

    cairo_set_source_rgba ( cr, rframe, gframe, bframe, aframe );
    cairo_stroke ( cr );

Any help is welcome!

Best regards,
Patrik

-- 
PGP-key fingerprint: 1B30 7F61 AF9E 538A FCD6  2BE7 CED7 B0E4 3BF9 8D6C

-- 
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.