[cairo] [PATCH 0/5] Fix dashing with zero length dash intervals.

Jeff Muizelaar jeff at infidigm.net
Sun Apr 9 20:10:36 PDT 2006


The following series of patches fixes dashing when the segment lengths are 0
(#5561). Currently cairo ends up using unitialized data for the faces of the
lines and consequently doesn't render anything useful. The patchset can be
applied by piping all of the messages into git-am.

The current implementation will render a zero-length visible segment as having
zero length. However, the ghostscript rasterizer as well as acrobat both render
these segments as they do zero-width lines -- 1 pixel thick.

Also, throughout the stroking code there are comments about drawing degenerate
paths (ones with zero length) as much as possible e.g. patch 1/5. According to
the PDF spec we do this wrong. Instead of drawing nothing always we should a
circle if the line cap is round. I don't address this problem in the patchset.

This series also improves the accuracy of the dashed lines. See
http://people.freedesktop.org/~jrmuizel/dash-accuracy-before.png,
http://people.freedesktop.org/~jrmuizel/dash-accuracy-after.png and
http://people.freedesktop.org/~jrmuizel/dash-accuracy.c
This is of course, however, not a realistic scenario but we can still have
warm fuzzies.

-Jeff


More information about the cairo mailing list