[cairo-bugs] [Bug 26025] New: (Almost) degenerate dash patterns handling failures

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jan 13 03:07:27 PST 2010


http://bugs.freedesktop.org/show_bug.cgi?id=26025

           Summary: (Almost) degenerate dash patterns handling failures
           Product: cairo
           Version: 1.9.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: cworth at cworth.org
        ReportedBy: ranma42 at gmail.com
         QAContact: cairo-bugs at cairographics.org


Almost degenerate dash patterns (where all dashes are very short), can cause
infinite loops in raster backends and invalid output in vector backends.

I've been able to confirm that quartz, svg and ps/pdf are affected by this
problem, but other backends might have it too.

A patch for quartz is available here:
http://lists.cairographics.org/archives/cairo/2010-January/018753.html

Vector backends (svg, pdf, ps) will produce invalid output for
dash-infinite-loop, because they print the dash pattern using the "%f" printf
format (which will happily print zeroes for very small numbers), but pdf
specification prohibits zero-sum patterns (8.4.3.6 of pdf specification 1.7)
and svg says that they are considered as non-dashed.

_cairo_stroke_style_dash_approximate could probably be used to partially solve
this problem (it would not  explicitly guarantee that patterns are not zero-sum
when printf'd unless appropriate limits on the tolerance are chosen).
It could either be used in the backend or right before passing the dash pattern
to the stroking function.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list