[cairo] Rendering error in cairo-1.5.10 and up

Franz Schmid Franz.Schmid at altmuehlnet.de
Mon Apr 28 05:53:47 PDT 2008


Carl Worth schrieb:
> Franz, What's really going to help us here if you can provide for us a
> sequence of cairo calls to replicate the bug. Perhaps you've got easy
> facilities in scribus for dumping out a path? (along with scale and
> stroke parameters like line width, join style, etc.)
> 
> Otherwise the libcairowrap utility (or maybe it's named cairo-trace
> these days) can be helpful by using an LD_PRELOAD to dump cairo calls
> while running scribus live. Here's one version of that:
> 
> 	git clone git://annarchy.freedesktop.org/~ickle/cairo-trace
> 
Have now tried out this tool, but sadly i don't see anything that
could help you. As the whole output of the tool is just to big
to post here i only include the relevant parts here.

Thats the sequence that draws a frame + the frame border
[0] cairo_new_path (cr1)
[0] cairo_move_to (cr1, 0, 0)
[0] cairo_line_to (cr1, 381, 0)
[0] cairo_line_to (cr1, 381, 285)
[0] cairo_line_to (cr1, 0, 285)
[0] cairo_line_to (cr1, 0, 0)  <-- that unneeded cairo_line_to shouldnt matter i guess?
[0] cairo_close_path (cr1)
[0] cairo_save (cr1)
[0] cairo_set_line_width (cr1, 2)
[0] cairo_set_dash (cr1, [1, 2], 1, 0)
[0] cairo_set_source_rgba (cr1, 0, 0, 0, 1)
[0] cairo_set_operator (cr1, CAIRO_OPERATOR_SOURCE)
[0] cairo_set_line_cap (cr1, CAIRO_LINE_CAP_BUTT)
[0] cairo_set_line_join (cr1, CAIRO_LINE_JOIN_MITER)
[0] cairo_stroke_preserve (cr1)
[0] cairo_set_operator (cr1, CAIRO_OPERATOR_OVER)
[0] cairo_restore (cr1)
[0] cairo_restore (cr1)

And this draws the fill for the next frame, immediatly follwing
the above calls
[0] cairo_save (cr1)
[0] cairo_translate (cr1, 212, 138)
[0] cairo_rotate (cr1, 0)
[0] cairo_save (cr1)
[0] cairo_new_path (cr1)
[0] cairo_move_to (cr1, 0, 0)
[0] cairo_line_to (cr1, 418, 0)
[0] cairo_line_to (cr1, 418, 356)
[0] cairo_line_to (cr1, 0, 356)
[0] cairo_line_to (cr1, 0, 0)  <-- that unneeded cairo_line_to shouldnt matter i guess?
[0] cairo_close_path (cr1)
[0] cairo_save (cr1)
[0] cairo_set_fill_rule (cr1, CAIRO_FILL_RULE_EVEN_ODD)
[0] cairo_set_source_rgba (cr1, 1, 0.92549, 0, 1)
[0] cairo_set_operator (cr1, CAIRO_OPERATOR_SOURCE)
[0] cairo_fill_preserve (cr1)
[0] cairo_set_operator (cr1, CAIRO_OPERATOR_OVER)
[0] cairo_restore (cr1)

This sequence is always the same for every redraw.

But sometimes there is a faint diagonal line beneath the
filled frame. If the cairo_set_dash command is omitted
or the path to be stroked is not closed the faint line
never appears.

Greetings,
Franz Schmid


More information about the cairo mailing list