[cairo] Rendering error in cairo-1.5.10 and up

Carl Worth cworth at cworth.org
Thu Apr 24 09:07:05 PDT 2008

On Thu, 24 Apr 2008 16:54:47 +0200, Franz Schmid wrote:
> sorry to bother you with another cairo bug. I discovered that
> in cairo-1.5.10 and up (including 1.6.4) the cairo_set_dash function
> causes rendering errors with dashed closed polygons.
> Please see http://bugs.scribus.net/view.php?id=6971
> for screenshots and comments.

Yikes! That looks like quite a bug.

> The only workaround for that problem is not to close the polygon,
> but that is simply not acceptable.
> The last working version of cairo is 1.5.8

Cairo 1.5.10 did include a stroking optimization:


and also something specific to dashed stroking:


It's not an exactly an easy change to simply revert for testing,
though, since it had several followups to fix some problems in the
original change:


All five of those changes made it into 1.5.10. But the fact that 3
followups were necessary does lead me to suspect that this new bug
might be yet another problem exposed by this stroking
optimization. (And, Vlad, if I'm wrong in my guess I apologize in
advance for pointing at your commits!)

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

Everyone, is Chris's version here the most up to date thing? We should
put this into /git to make it more clear which version is
official. And we could really use a wiki page on cairographics.org
explaining how to use this.

Thanks for the report, Franz. Sorry about the bug, and I hope we'll be
able to get it fixed quickly.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080424/1ad2d43f/attachment.pgp 

More information about the cairo mailing list